mysql ::”can't connect to MySQL server on localhost“”

origin

 Today, when I started SSH, it has been unable to run. I always thought it was a code problem, but no error was reported. How to adjust it? Later, I had an idea, could it be a problem with the database, and then opened the database. At this time, the error is displayed : """can't connect to MySQL server on localhost"";
 write picture description here

reason

I checked something on the Internet, it turned out that it was because the mql service was closed, resulting in the mysql database not being able to start.

plan:

Open the "" Control Panel - Administrative Tools - Services - find the two files of mysql, and then start the service, it's OK!
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324730119&siteId=291194637