Mysql – Config file location in MySQL

MySQLmysql-5.5

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?

Best Answer

As your my.cnf is not on standard location, check ps -ef | grep mysql for --defaults-file option.

Below command will give you default file options:

mysqld --verbose --help | grep -A 1 "Default options"

(There are many similar questions previously answered.)