mysql切换数据路径无法启动
环境
centos:6.5 mysql:5.1.73
问题
更改my.cnf中数据路径后,mysql无法启动
启动后,启动日志如下:
- 160523 12:58:03 mysqld started
- 160523 12:58:03 [Warning] Can’t create test file /home/mysql/localhost.lower -test
- 160523 12:58:03 [Warning] Can’t create test file /home/mysql/localhost.lower -test
- /usr/libexec/mysqld: Can’t change dir to ‘/home/mysql/’ (Errcode: 13)
- 160523 12:58:03 [ERROR] Aborting
- 160523 12:58:03 [Note] /usr/libexec/mysqld: Shutdown complete
解决
关闭selinux或者将selinux的访问权限设置为permissive模式