InnoDB: Operating system error number 13 in a file operation.

Mysql安装好以后,启动服务报如下错误:mysql

Starting mysqld (via systemctl):  Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.sql

经过日志能够看到如下错误:ui

cat /var/log/mysqld.log日志

2018-11-05T14:56:36.150707Z 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2018-11-05T14:56:36.150728Z 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2018-11-05T14:56:36.150734Z 0 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
2018-11-05T14:56:36.150744Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-11-05T14:56:36.751167Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-11-05T14:56:36.751185Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-11-05T14:56:36.751190Z 0 [ERROR] Failed to initialize builtin plugins.
2018-11-05T14:56:36.751194Z 0 [ERROR] Abortingcode

解决方案:setenforce 0 get

就能够了it

相关文章
相关标签/搜索