Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’

Cannot connect to Mysql through /tmp/mysql.sock. The reason is that this socket does not exist. Two versions of mysql are installed, one is 5.7, socket: /tmp/mysql-5.7.sock and one 5.5, socket: /tmp/mysql-generic -5.5.sock. Just specify the socket connection in the following way.

mysql –socket=/tmp/mysql-5.7.sock -u databaseuser -p

Related Article
WordPress automatically intercepts part of the content of the article as a summary

In the daily release of articles, not every article may have an article summary, so the summary function of WordPress Read more

How to add user defined upload avatar function in WordPress

Friends who use WordPress to build a website should know that WordPress itself does not have the function of uploading Read more

How to get the number of articles and comments of the current logined user in WordPress

When developing WordPress Theme user center, I want to get the number of articles and comments of current logged in Read more

WordPress tips: get statistics of the number of pictures in the article

As far as I know, WordPress has no function to count the number of pictures in the article, so to Read more

Leave a Reply

Your email address will not be published. Required fields are marked *

To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-spam image