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 

 

 

 

相关文章:

  • 2021-12-07
  • 2022-01-29
  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2022-02-07
猜你喜欢
  • 2021-12-10
  • 2022-02-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-12-24
相关资源
相似解决方案