Troubleshoot MySQL issues

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.