mysql: my.cnf在哪里?

先找到mysqld的执行文件

引用
#ps aux|grep mysqld

如:  /usr/libexec/mysqld

运行一下这个程序的help命令,根据输出中的"Default options"关键字找到my.cnf的位置

引用
#sudo /usr/libexec/mysqld –verbose –help |grep -A1 "Default options"

如:

引用

Default options are read from the following files in the given order:

/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.