CentOS7 install MySQL error Failed to start mysqld.service: Unit not found a solution

1 ~] # systemctl start mysql.service
To start the MySQL database is such tips

1 ~] # Failed to start mysqld.service : Unit not found
solution is as follows:

First you need to install mysql-server

1 ~] # yum install -y mysql -server
start the service

1 ~] # systemctl start mysqld.service
added to the boot

1 ~]# systemctl enable mysqld.service

After connecting to the database mysql command

Guess you like

Origin www.cnblogs.com/kai0438/p/12090722.html