Skip to content

Categories:

mysql更改数据存放目录

假设数据库原来的存放目录为/usr/local/mysql/var
新的目录为/var/mysql
1./usr/local/mysql/share/mysql/mysql.server stop
2.mkdir /var/mysql
chown -R mysql /var/mysql
chgrp -R mysql /var/mysql
3.vi /etc/my.cnf
add: datadir=/var/mysql
log-bin=/var/mysql/mysql-bin
4./usr/local/mysql/share/mysql/mysql.server start

Posted in 收藏.

Tagged with , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

You must be logged in to post a comment.