CentOS7.2 installs mariadb-server to solve Failed to start mysqld.service: Unit not found

when entering the command

~]# systemctl start mysql.service

To start the MySQL database is this prompt

Failed to start mysqld.service: Unit not found

The solution is as follows:

  First you need to install mariadb-server

  ~]# yum install -y mariadb-server

  start the service

  ~]# systemctl start mariadb.service

  add to boot

  ~]# systemctl enable mariadb.service

Make some security settings, and change the database administrator password

  ~]# mysql_sceure_installation

That's it!

can test

  ~]#  mysql -u root -p

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325949849&siteId=291194637
Recommended