原因
在mysql错误日志里出现:The innodb_system data file ‘ibdata1’ must be writable,字面意思:ibdata1必须可写
查看日志报错,文件夹无写入权限
cat /var/log/mysqld.log
解决
查找文件路径
find / -name ibdata1
授予文件夹权限
chmod -R 777 /var/lib/mysql
chown mysql:mysql -R /var/lib/mysql
启动MySQL
systemctl start mysqld.service
// 查看MySQL状态
systemctl status mysqld.service