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

Failed to start MySQL 8.0 database server.

上一篇:JDBC


下一篇:mysql45讲(2)