Can't connect to local MySQL server through socket '/var/run/mysqld. Sock'. Let's talk about the solution: root @ zby :~ #/Etc/init. d/MySQL restart cannot be started. It may be the permission of/var/run/mysqld on the Internet. However, I installed it through apt-Get install, root @ zby:/var/run/mysqld # ll/var/run/mysqld/drwxr-XR-x 2 MySQL Root 80. /display that the owner is mysql. If there is no problem, you can solve the problem by using the following methods: root @ zby:/usr/bin #/usr/bin/mysql_install_db installing MySQL system tables... okfilling help tables... OK to start mysqld at boot time YOU HAVE TO copysupport-files/MySQL. server to Right place for your system ............ Root @ zby :~ # The/etc/init. d/MySQL start file is root @ zby: ~ in/var/run/MySQL :~ # The purpose of the LS/var/run/mysqld. PID mysqld. sockmysql_install_db script is to generate a new MySQL authorization table. It does not overwrite the existing MySQL authorization table and does not affect any other data. If you want to recreate the authorization table, first stop the mysqld server (if it is running)
This article is from the Stephen blog, please be sure to keep this source http://stephenzhao.blog.51cto.com/2515860/573267