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 uses jquery.lazyload.js image lazy loading plugin to improve website opening speed

Too many pictures on the website will greatly affect the opening speed. If there are too many pictures, the user Read more

What all junior WordPress developers should know

Anyone calling themselves a junior WordPress developer should know HTML and CSS, some basic PHP, and how WordPress works. That’s Read more

Get HD cover images of youtube videos in various sizes

How to get the url of Youtube video cover image: Just copy the cover image address below, and then replace Read more

How to change the default word length of summary of the function the_excerpt() in WordPress

The WordPress summary function the_excerpt() default display number of words can be modified as the following:

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