Why can't I find the MySQL service in CentOS7 and can't find Mysql.sock?

Source: Internet
Author: User

Personal encounters with problems:

I bought the cloud host one months ago, the UI picture is good, the front end is also written, PHP How to develop also think well, the result, the installation of Apache is successful, MySQL seems to be installed successfully, but MySQL simply can not run up, make me careless write code.

The details are as follows:

Use service mysqld start; Systemctl mysqld start; there is no use, always show no mysqld this service (MySQL is not),

When you use Mysql-uroot-p, it also shows that you cannot connect to the MySQL server via Mysql.sock.

I also saw countless posts, Google turned over, are useless, are no use, and then went to the library borrowed a book called "in-depth understanding of MySQL and mariadb" books, finally solved the problem. (/(ㄒoㄒ)/)

Reason:

Yes, you run the Yum install on Cento7 mysql install is mariadb (this is the MySQL original squad after MySQL company sold to other companies a few years later, to prevent MySQL from being the Oracle closed source new generation of a MySQL branch), Instead of the original MySQL.

In addition, so you run

Yum install MySQL is equivalent to running yum install MariaDB

But for MARIADB, the direct installation of MARIADB is not going to run as a service, because you only install MARIADB client, so you also need to download a series of MARIADB components than Mariadb-server (server side).

Workaround:

Run the  yum Search all MariaDB

A series of packages are then listed

Mariadb-benchmariadb-develmariadb-embeddedmariadb-servermariadb-testmariadb-libs

Install these to solve the problem (can choose to install Oh, each package is introduced)

In addition, if you feel that I am not detailed, please refer to the Linux commune article:

CentOS 7.0 uses Yum to install MariaDB and MariaDB simple configuration

CentOS installs MARIADB (MySQL) through Yum and cannot start the service or find Mysql.sock

Why can't I find the MySQL service in CentOS7 and can't find Mysql.sock?

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.