时间:2020-03-03来源:电脑系统城作者:电脑系统城
1停服务
/etc/init.d/mysqld stop
ls /var/lib/mysql/
2改配置
vi /etc/my.cnf
datadir=/data/mysql
3移数据
rsync -a /var/lib/mysql /data
hown -R mysql:mysql /data
4启动
/etc/init.d/mysqld start
#启动失败报错如下
200303 10:37:11 mysqld_safe Starting mysqld daemon with databases from /data/mysql
200303 10:37:11 [Warning] Can't create test file /data/mysql/logserver2.lower-test
200303 10:37:11 [Warning] Can't create test file /data/mysql/logserver2.lower-test
/usr/libexec/mysqld: Can't change dir to '/data/mysql/' (Errcode: 13)
200303 10:37:11 [ERROR] Aborting
200303 10:37:11 [Note] /usr/libexec/mysqld: Shutdown complete
200303 10:37:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
改selinux配置恢复正常
参考https://www.jb51.net/article/61107.htm
getenforce
setenforce 0
vi /etc/selinux/config
2024-07-07
myeclipse怎么导入tomcat教程2024-07-07
myeclipse如何启动tomcat2024-07-07
myeclipse如何绑定tomcat上线了一个小的预约程序,配置通过Nginx进行访问入口,默认的日志是没有请求时间的,因此需要配置一下,将每一次的请求的访问响应时间记录出来,备查与优化使用....
2023-03-17