1

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?

asked Jul 29, 2015 at 4:50

2 Answers 2

1

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.)

answered Jul 29, 2015 at 4:59
4
  • ps -ef | grep mysql - doesn't show the --defaults-file for me. It only shows data dir, base dir, plugin dir, user, log error, pid file. Commented Jul 29, 2015 at 5:04
  • Try the last blog link anchored to "answered"... it has covered multiple options. Commented Jul 29, 2015 at 5:16
  • ok I'm having trouble enabling the binary logging. Commented Jul 29, 2015 at 7:18
  • I saw your question for the same. So the answer to it will be dependent on the answer to this one :) Invited you to a chat. Commented Jul 29, 2015 at 9:22
0

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 cnf file.

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.

answered Jul 29, 2015 at 9:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.