Question

Can someone please tell me how to enable my.cnf options in CentOS 6?

I have all the expected .cnf files in /usr/share/mysql but they simply don't work.

/etc/init.d/mysqld --help --verbose
Usage: /etc/init.d/mysqld {start|stop|status|restart|condrestart|try-restart|reload|force-reload}
Was it helpful?

Solution 3

The solution was to place the my.cnf file in /etc/mysql/my.cnf

OTHER TIPS

Default location is /etc/my.cnf as far as I'm aware of. Maybe you should try and copy them over there and restart?

my.cnf should be placed in /etc/ like /etc/my.cnf

the init.d script mysqld relais on the script in /usr/bin/my_print_defaults ..

this scripts takes as first input the "domain", e.g. mysqld_safe oder mysqld and outputs the config ..

this script merges the .cnf files from /etc/mysq/my.cnf + /etc/my.cnf + ~/.my.cnf together and outputs key=value pairs in the form of ..

]# /usr/bin/my_print_defaults mysqld
--datadir=/var/lib/mysql
--socket=/var/lib/mysql/mysql.sock
--user=mysql
--symbolic-links=0

so placing the .cnf files in /usr/share/mysql might be wrong ..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top