/usr/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)

150214 00:19:30 mysqld_safe Starting mysqld daemon with databases from /data/mysql
150214  0:19:30 [Warning] Can't create test file /data/mysql/localhost.lower-test
150214  0:19:30 [Warning] Can't create test file /data/mysql/localhost.lower-test
/usr/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
150214  0:19:30 [ERROR] Aborting


150214  0:19:30 [Note] /usr/libexec/mysqld: Shutdown complete


150214 00:19:30 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150214 00:21:52 mysqld_safe Starting mysqld daemon with databases from /data/mysql
150214  0:21:52 [Warning] Can't create test file /data/mysql/localhost.lower-test
150214  0:21:52 [Warning] Can't create test file /data/mysql/localhost.lower-test
/usr/libexec/mysqld: File './mysql-bin.index' not found (Errcode: 13)
150214  0:21:52 [ERROR] Aborting


150214  0:21:52 [Note] /usr/libexec/mysqld: Shutdown complete


提示./mysql-bin.index无法找到(由于mysql开启了bin日志功能),到数据库根目录查看该文件是存在的,可能是文件权限的问题,查看了数据库根目录的权限是700,所有者和用户组都是root,可能是上次转移数据库的时候不小心修改了文件夹的权限。

解决方法:

chown -R mysql.mysql /data/mysql


重启还是报一样的错,各种折腾,最后定位问题selinux害死人……


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值