The system deleted the MySQL user, causing the MySQL restart error, the content is as follows:
161025 21:24:55 Mysqld_safe starting mysqld daemon with databases From/var/lib/mysql
/usr/libexec/mysqld:can ' t find file: './mysql/plugin.frm ' (errno:13)
161025 21:24:55 [ERROR] Can ' t open the Mysql.plugin table. Please run Mysql_upgrade to create it.
161025 21:24:55 innodb:initializing buffer pool, size = 8.0M
161025 21:24:55 innodb:completed initialization of buffer pool
161025 21:24:55 innodb:operating System error number in a file operation.
Innodb:the error means mysqld does not has the access rights to
Innodb:the directory.
Innodb:file name./ibdata1
Innodb:file operation call: ' Open '.
Innodb:cannot continue operation.
161025 21:24:55 mysqld_safe mysqld from PID File/var/run/mysqld/mysqld.pid ended
Considering that the MySQL service is started by using MySQL user, first add MySQL user, useradd-r MySQL
Modify Directory Permissions: Cd/var/lib/mysql
Chown-r Mysql.mysql *
Start or error, display information:
161025 21:57:47 [ERROR]/usr/libexec/mysqld:can ' t create/write to file '/var/run/mysqld/mysqld.pid ' (errcode:13)
161025 21:57:47 [ERROR] Can ' t start server:can ' t create PID File:permission denied
This is obvious, Mysql.pid does not have permission to generate
Permissions Granted: Chown-r mysql.mysql/var/run/mysqld/
Start MySQL, success.
This article is from the Linux Technical Exchange blog, so be sure to keep this source http://9678130.blog.51cto.com/9668130/1865708
Troubleshoot MySQL issues