CCVOIP
asked on
Mysql is not using /etc/my.cnf
Hi
I have mysql 5.1.73 installed on centos6.4
when I stop/start mysqld :
when I stop/start mysqld :
any idea why this is happening?
Thanks,
I have mysql 5.1.73 installed on centos6.4
when I stop/start mysqld :
/etc/init.d/mysqd stop/start, as a root user, the system variables within /etc/my.cnf are applied
when I stop/start mysqld :
/etc/init.d/mysqd stop/start, as a mysql user I notice the following variables changes logged into error.log
151023 19:58:15 [Warning] Changed limits: max_open_files: 1024 max_connections: 886 table_cache: 64
any idea why this is happening?
Thanks,
Have you looked to see if the 'user' has a separate 'my.cnf' file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello Tomas,
rebooted the machine, but still the same thing :( . any other suggestions??
I followed your suggestion to fix open files and it worked perfectly. Thanks
Regards,
[root@ ~]#mysql --help | grep "Default options" -A 1
Default options are read from the following files in the given order:
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
[root@ ~]#cat /etc/mysql/my.cnf
cat: /etc/mysql/my.cnf: No such file or directory
[root@ ~]# cat ~/.my.cnf
cat: /root/.my.cnf: No such file or directory
[mysql@ ~]# cat ~/.my.cnf
cat: /home/mysql/.my.cnf: No such file or directory
rebooted the machine, but still the same thing :( . any other suggestions??
I followed your suggestion to fix open files and it worked perfectly. Thanks
Regards,
Hi!
The command
Note that if you don't find any my.cnf on the default paths then you can always create one (in the /etc/ path ) and configure the system parameters you want to differ from default. :)
Regards,
Tomas Helgi
The command
locate my.cnf
(issued as root) should give you all my.cnf files on your host. Note that if you don't find any my.cnf on the default paths then you can always create one (in the /etc/ path ) and configure the system parameters you want to differ from default. :)
Regards,
Tomas Helgi
ASKER
Hi,
I do have a my.cnf file under /etc/ where I specified all the configuration . it's just I don't understand why root user uses the /etc/my.cnf and mysql user uses something else which I don't seem to find.!!
Thanks
I do have a my.cnf file under /etc/ where I specified all the configuration . it's just I don't understand why root user uses the /etc/my.cnf and mysql user uses something else which I don't seem to find.!!
Thanks
Hi!
The default location for the my.cnf is usually in the /etc folder where the mysql user (user running the deamon) accesses it.
Regards,
Tomas Helgi
The default location for the my.cnf is usually in the /etc folder where the mysql user (user running the deamon) accesses it.
Regards,
Tomas Helgi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
both commands return nothing
both commands return nothing
[root@~]# ps -ef | grep mysql | grep "defaults-file"
[root@~]#
[root@ ~]# mysql --print-defaults
mysql would have been started with the following arguments:
[root@ ~]#
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for CCVOIP's comment #a41135975
Assisted answer: 250 points for TomasHelgi's comment #a41104064
Assisted answer: 250 points for TomasHelgi's comment #a41134047
for the following reason:
thank you all for your responses. but still having the same issue!!
Accepted answer: 0 points for CCVOIP's comment #a41135975
Assisted answer: 250 points for TomasHelgi's comment #a41104064
Assisted answer: 250 points for TomasHelgi's comment #a41134047
for the following reason:
thank you all for your responses. but still having the same issue!!
ASKER
Thanks all for your response. but I still have the same issue!!!