【解决】mysql_real_connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
mysql_real_connect: Can& 39;t connect to local MySQL server through socket & 39; tmp mysql sock& 39;解决方法(挨个试):1、ln -s run mysql mysql sock tmp mysql sock2、ln -s var lib mysql mysql sock tmp mysql sock3、service mysql restart