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

Source: Internet
Author: User

Today in a cloud host (CENTOS7) installation (yum install mode) mariadb (ie, open source MySQL), unable to start mariadb, in fact, the installation is not complete, of course, not to start, let alone input "Mysql-u root" prompt can ' t Connect to local MySQL server through socket '/tmp/mysql.sock ' (2). No technical content of the solution began.

To install MARIADB, search first:

$ sudo yum search mariadb

Appear:

$ sudo yumSearch mariadbloaded plugins:langpacks============================= N/S matched:mariadb =============================mariadb-Bench.x86_64:MariaDB Benchmark scripts and datamariadb-devel.i686:files for development of mariadb/MySQL applicationsmariadb-devel.x86_64:files forDevelopment of mariadb/MySQL applicationsmariadb-Embedded.i686:MariaDB as an embeddable librarymariadb-Embedded.x86_64:MariaDB as an embeddable librarymariadb-embedded-devel.i686:development files forMariaDB as an embeddable:librarymariadb-embedded-devel.x86_64:development files forMariaDB as an embeddable:librarymariadb-libs.i686:the Shared Libraries Required formariadb/MySQL clientsmariadb-libs.x86_64:the Shared Libraries Required formariadb/MySQL clientsmariadb-server.x86_64:The MariaDB Server and related FILESMARIADB.X86_64:A community developed branch of MYSQLMARIADB-test.x86_64:the test suite distributed with Mariad

Well, put mariadb mariadb-bench mariadb-server mariadb-embdedeb mariadb-libs mariadb-server are installed:

$  Yuminstall mariadb-embedded mariadb-libs mariadb-bench mariadb mariadb-sever

Start mariadb, then try "mysql-u root" to find out, OK, as a archlinuxer for CentOS (or RPM series?). MARIADB packing is very thin.

Oh, what the service xx start command is not available on many new versions of Linux distributions , the correct way to open it is systemctl [option] [XX], MARIADB (MySQL) uses:

$ systemctl Start mariadb

When CentOS uses Systematl I don't know, at least centos7 with Systemctl. Boot from:

$ systemctl Enable MARIADB

(gossip) Online a bunch of old can not be old web content really let rookie such as I do not love with what CentOS (and local tyrants reahat-bar often come out novice ask antique redhat problem ... The so-called textbook poison AH) very helpless, can not solve AH. It is said that yum install rpm MySQL (mariadb) default Mysql.sock file is not in the default location is/var/lib/mysql/, and under/temp/xxx, to modify my.conf (now MARIADB configuration file is my.cnf, less an O) inside the sock configuration, or soft links to the default location, some say how the permissions problem, and some say how to uninstall the installation how ... In fact, only the installation is not complete. My impression is that Debian with apt software, telework, aptitude install MySQL, the family barrel should be inevitable. This small problem let me a burst of find, originally just did not install all, except server I really did not how to use CentOS or Fedora, oh da.

  

CentOS installs MARIADB (MySQL) through Yum and cannot start the service or 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.