Remember once MySQL boot failure Can ' t connect to local MySQL server through socket

Source: Internet
Author: User


Remember once MySQL boot failure Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock '


Failure phenomena:

[[email protected] ~]# mysql -uroot -penter password: error 2002  (HY000):  can ' t connect to local mysql server through socket  '/var /lib/mysql/mysql.sock '   (2) [[email protected] ~]# [[email protected] ~]#  service mysqld restartstopping mysqld:                                             [   Ok  ]mysql daemon failed to start. starting mysqld:                                             [failed][[email protected] ~]# 


Find out where MySQL's error log is

[[email protected] ~]# Find/-iname ' *.err '/var/lib/mysql/centos.err[[email protected] ~]#


Parsing errors

[[email protected] ~]# tail /var/lib/mysql/centos.err 170321 09:48:17  mysqld_safe starting mysqld daemon with databases from /var/lib/mysql/usr/ libexec/mysqld: error while loading shared libraries: libstdc++.so.6:  failed to map segment from shared object: permission denied170321  09:48:17 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid  ended[[email protected] ~]# [[email protected] ~]# find / -iname  ' *libstdc++.so.6* '/usr/lib/libstdc++.so.6/usr/lib/libstdc++.so.6.0.13/usr/lib/libstdc++.so.6.0.22[[email  Protected] ~]# [[email protected] ~]# ll /usr/lib/libstdc++.so.6*lrwxrwxrwx.  1 root   root        19 3 Month    12 10:36 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.22-rwxr-xr-x. 1 root   root     942040 11 Month  21 2013 /usr/lib/libstdc++.so.6.0.13-rwxr-xr-x. 1 chunli  chunli 9099895 3 Month   12 07:27 /usr/lib/libstdc++.so.6.0.22[[email  protected] ~]#



Search for a while, also did not find the right solution, but see a lot of selinux figure

Try to close SELinux

[[email protected] ~]# getenforce enforcing[[email  protected] ~]# setenforce 0[[email protected] ~]# getenforce  permissive[[email protected] ~]# service mysqld restartstopping mysqld:                                              [  OK  ]Starting mysqld:                                              [  ok  ] 

The problem is not solved directly, but around the past, there is time to chew again, first of all to do the thing at hand.





This article is from the "Li Chunli" blog, make sure to keep this source http://990487026.blog.51cto.com/10133282/1908657

Remember once MySQL boot failure Can ' t connect to local MySQL server through socket

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.