mysql 配置路径

1)关于配置文件路径

有时候,我发现虽然尝试修改了配置文件的一些变量,但是并没有生效。后来才发现原来是因为修改的文件并非MySQL服务器读取的配置文件。

如果不清楚MySQL当前使用的配置文件路径,可以尝试这样查看:

 /usr/local/zend/mysql/bin/mysqld --verbose --help | grep -A 1 'Default options'

141020 17:34:05 [ERROR] Can't find messagefile '/usr/local/mysql/share/errmsg.sys'

141020 17:34:05 [Warning] Can't create test file /usr/local/mysql/data/zhepamadeiMac.lower-test

141020 17:34:05 [Warning] Can't create test file /usr/local/mysql/data/zhepamadeiMac.lower-test

/usr/local/zend/mysql/bin/mysqld: Can't change dir to '/usr/local/mysql/data/' (Errcode: 2)

141020 17:34:05 [Note] Plugin 'FEDERATED' is disabled.

/usr/local/zend/mysql/bin/mysqld: Unknown error 1146

141020 17:34:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

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

/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf 

 

 

 

原文地址:https://www.cnblogs.com/zhepama/p/4037909.html