执行如下命令:/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options'
可能看到如下信息:
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'
上面信息中,etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf给出的几个目录,就是mysql依次查找配置文件的位置。
如果是xp下IIS平台中,一般在安装目录下的data文件夹下,或者在C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data(你的可能是C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.0\data linux 或windows 下 mysql的数据文件在datadir下,你在数据库中执行 show variables like '%datadir%'就会显示数据库文件的路径,你可以找到ac文件夹欢迎分享,转载请注明来源:内存溢出
评论列表(0条)