mysql无法启动-The innodb_system data file ‘ibdata1‘ must be writable

mysql无法启动-The innodb_system data file ‘ibdata1’ must be writable [ERROR] Failed to initialize builtin plugins.

2021-11-05T03:39:32.096282Z 0 [ERROR] Aborting

查看mysql日志 默认路径
/var/log/mysql.log
报错如下:
在这里插入图片描述
mysql无法启动-The innodb_system data file ‘ibdata1‘ must be writable
根据日志查看提示,是innodb文件没有写入权限
查找ibdata1文件路径
查找该文件:
find / -name ibdata1

mysql无法启动-The innodb_system data file ‘ibdata1‘ must be writable
存在该文件如下
mysql无法启动-The innodb_system data file ‘ibdata1‘ must be writable
授予权限,分别执行:
chmod -R 777 /var/lib/mysql
chown mysql:mysql -R /var/lib/mysql
重新关闭MySQL服务器:systemctl stop mysqld
再重新启动MySQL服务器:systemctl start mysqld.service
成功!
mysql无法启动-The innodb_system data file ‘ibdata1‘ must be writable

上一篇:mysql数据迁移记录


下一篇:mysql 利用ibd文件恢复数据库