执行如下命令:/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依次查找配置文件的位置。
假如要把目录移到/home/data下需要进行下面几步:1、home目录下建立data目录cd/homemkdir
data2、把MySQL服务进程停掉:mysqladmin
-u
root
-p
shutdown3、把/var/lib/mysql整个目录移到/home/datamv
/var/lib/mysql/home/data/
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)