After installing mysql, the problem prompts Can't connect to local MySQL server through socket '/tmp/mysql.sock'

After installing mysql with mysql-5.1.73-linux-i686-glibc23, after entering mysql -u root -p and password, the prompt Can't connect to local MySQL server through socket '/tmp/mysql.sock' was not found. mysql.sock file, after trying various methods found on the Internet without success, I tried changing the permissions of the /tmp directory by chmod 777 /tmp -R and then reinstalling it. So when this problem occurs, It is necessary to determine whether the problem of mysql.sock being unable to be written due to lack of permissions on the directory.

Guess you like

Origin blog.csdn.net/csdn_zmf/article/details/45644923