欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

确定MySQL在Linux系统中配置文件的位置

程序员文章站 2022-06-07 10:38:15
...
1.通过which mysql命令来查看mysql的安装位置。
如确定位于/usr/local/mysql/bin

2.通过/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options'命令来查看mysql使用的配置文件默认路径。
可能看到如下信息:
2019-04-14 19:18:23 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2019-04-14 19:18:23 0 [Note] mysqld (mysqld 5.6.42) starting as process 14944 ...
2019-04-14 19:18:23 14944 [Note] Plugin 'FEDERATED' is disabled.
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
2019-04-14 19:18:23 14944 [Note] Binlog end
2019-04-14 19:18:23 14944 [Note] Shutting down plugin 'MyISAM'
2019-04-14 19:18:23 14944 [Note] Shutting down plugin 'CSV'
相关标签: mysql