-3

I am working on a RHEL 6.6 server which runs MySQL version 5.7.17 which I had installed by the following command:

yum install mysql-server

My client want me to move the my.cnf from it's default location /etc/my.cnf to /app/mysql/my.cnf. If I move, the mysql server fails.

I cannot find any way to do this.

If anyone know the way, please help me.

Sultan
  • 235
  • 2
  • 5

1 Answers1

3

Pass --defaults-file=/app/mysql/my.cnf when mysql is launched.

Another option is to create a symbolic link to /etc/my.cnf:

ln -s /app/mysql/my.cnf /etc/my.cnf
airhuff
  • 182
  • 10