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