Centos7 Yum does not start up after installing MySQL.

Source: Internet
Author: User

[[email protected] ~]# systemctl start mysqld start failed

Job for Mysqld.service failed because the control process exited with error code. See "Systemctl Status Mysqld.service" and "Journalctl-xe" for details.

To view the System log error:

May 19:04:53 localhost mysqld:2018-05-29t11:04:53.723812z 0 [ERROR] innodb:the innodb_system data file ' ibdata1 ' must Be writable
May 19:04:53 localhost mysqld:2018-05-29t11:04:53.723862z 0 [ERROR] innodb:the innodb_system data file ' ibdata1 ' must Be writable
19:04:53 localhost mysqld:2018-05-29t11:04:53.723871z 0 [ERROR] innodb:plugin initialization aborted with error G Eneric Error
May 19:04:54 localhost mysqld:2018-05-29t11:04:54.325440z 0 [ERROR] Plugin ' InnoDB ' init function returned ERROR.
May 19:04:54 localhost mysqld:2018-05-29t11:04:54.325475z 0 [ERROR] Plugin ' InnoDB ' registration as a STORAGE ENGINE f Ailed.
May 19:04:54 localhost mysqld:2018-05-29t11:04:54.325483z 0 [ERROR] Failed to initialize builtin plugins.
May 19:04:54 localhost mysqld:2018-05-29t11:04:54.325485z 0 [ERROR] aborting

The cause of the error is roughly: Your data file is not writable

Cause: The owner of the Yum installed MySQL is root, and MySQL requires the identity to be MySQL, and the permissions issue causes the data file to be non-writable

Here's how to fix it:

[Email protected] ~]# chown-r mysql/var/lib/mysql

[Email protected] ~]# systemctl start mysqld

[Email protected] ~]# Tailf/var/log/messages &

Log printing:

May 19:09:15 localhost mysqld:version: ' 5.7.22 ' socket: '/var/lib/mysql/mysql.sock ' port:3306 mysql Community Serv ER (GPL)

Startup success

Log in to MySQL, do not need a password at this time, directly enter:

# mysql-u Root-p

Change the root password to 123456:

mysql>  use Mysql;> update user set Authentication_ String=password ( "123456"   where User=  ' root ' ;> flush Privileges;# refresh permissions, do not refresh the words may cause MySQL Enter directly will be logged on            

Note The password field name of version 5.7 is authentication_string, which was previously password.

After the modification, remember to comment out the my.cnf in the skip-grant-tables parameter, restart the MySQL service, you can use the password you set to log in.

Centos7 Yum does not start up after installing MySQL.

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.