MySQL 启动日志报错: File /mysql-bin.index not found (Errcode: 13 - Permission denied)

执行service mysqld start报错
Starting MySQL. ERROR! The server quit without updating PID file (/home/data/localhost.localdomain.pid).
检查mysql日志,mysql日志报错如下图:
MySQL 启动日志报错: File /mysql-bin.index not found (Errcode: 13 - Permission denied)_第1张图片

/www/server/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13 - Permission denied)
2020-06-17 09:59:37 28198 [ERROR] Aborting

2020-06-17 09:59:37 28198 [Note] Binlog end
2020-06-17 09:59:37 28198 [Note] /www/server/mysql/bin/mysqld: Shutdown complete

第一行的错误提示,errcode13,一般就是权限问题,mysql用户是否对数据库目录内的所有文件具有写的权限

解决办法修改MySQL目录的用户和用户组权限

chown -R mysql:mysql   /usr/local/mysql

这里的/usr/local/mysql为mysql储存位置,将其修改为自己服务器上的mysql储存位置
再次重启显示成功

你可能感兴趣的:(linux,mysql)