Solution to CentOS7 failure to start mysql

Source: Internet
Author: User
The MariaDB database management system is a branch of MySQL. it is mainly maintained by the open-source community and licensed by GPL. One of the reasons for developing this branch is that after Oracle acquired MySQL, there is a potential risk of closing the source of MySQL. Therefore, the community uses the branch method to avoid this risk. [3] MariaDB aims to be fully compatible with MySQL, including APIs and command lines, so that it can easily become a substitute for MySQL. For the storage engine, XtraDB (named"

The MariaDB database management system is a branch of MySQL. it is mainly maintained by the open-source community and licensed by GPL. One of the reasons for developing this branch is that after Oracle acquired MySQL, there is a potential risk of closing the source of MySQL. Therefore, the community uses the branch method to avoid this risk. [3]

MariaDB is designed to be fully compatible with MySQL, including APIs and command lines, so that it can easily become a substitute for MySQL. In terms of storage engine, XtraDB (named Aria) is used to replace InnoDB of MySQL in version 10.0.9.

# yum install mysql -y# mysqlERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Try to start the mysql service.

# systemctl start mysqlFailed to issue method call: Unit mysql.service failed to load: No such file or directory.# systemctl start  mysql.serviceFailed to issue method call: Unit mysql.service failed to load: No such file or directory# systemctl enable mysql.serviceFailed to issue method call: Access denied

The following describes the correct steps.

# yum install mariadb-server -y# systemctl start mariadb.service# systemctl enable mariadb.service# mysqlWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 10Server version: 5.5.44-MariaDB MariaDB ServerCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> 

Done!

How to set the mysql root password

# mysql_secure_installation
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.