I have MySQL 5.5 running in RHEL. I have checked for my.cnf file in my filesystem and its available in two destinations. One in the user's home directory and the other is in /data/etc_ORIG directory. It was not seen in /etc or /etc/mysql folder. Is there any issue with the config file present in a different path? And how do I check which config is being used by MySQL?
You can execute the following command to check if
my.cnf is used or note by executing the following command
ps -ef |grep mysql or
strace ./mysqld the first command (
ps -ef |grep mysql) will show you the active mysql service ID and the default
cnf file location, the other one will show you only the location of the
As for the location my the
cnf file it can be anywhere as long as MySQL user can access it and the file has 644 permission level.