Failed to start MySQL 8.0 database server.

原因

在mysql错误日志里出现:The innodb_system data file ‘ibdata1’ must be writable,字面意思:ibdata1必须可写

查看日志报错,文件夹无写入权限

cat /var/log/mysqld.log

Failed to start MySQL 8.0 database server.

解决

查找文件路径

find / -name ibdata1

Failed to start MySQL 8.0 database server.

授予文件夹权限

chmod -R 777 /var/lib/mysql
chown mysql:mysql -R /var/lib/mysql

启动MySQL

systemctl start mysqld.service
// 查看MySQL状态
systemctl status mysqld.service
上一篇:KKB: MySQL的bug :删除数据,不会导致ibdata1文件 缩小


下一篇:第一次的博客-简单的Markdown语法