我如何知道 MySQL 当前使用的是哪个配置文件?有什么命令或者什么东西可以查到吗?
最佳答案
你想要的信息可以通过运行找到
mysql --help
或
mysqld --help --verbose
我在我的机器上试过这个命令:
mysql --help | grep "Default options" -A 1
然后打印出来:
Default options are read from the following files in the given order:
/etc/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
看看这是否适合你。
https://stackoverflow.com/questions/3270326/