MYSQL login problems: Solving ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)

Solve the problem of ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost:3306' (10061)

Picked up mysql again, and such a problem occurred during configuration. When
logging in, I entered mysql -uroot -p and found the following error.
Insert image description here
Solution:
Step 1: Continue to enter mysqld --console in the window and the following window appears:
Insert image description here
Then restart Open the above window in cmd, that is, the second window (note that the above window is opened with administrator rights, and the first window cannot be closed)

Repeat the operation as shown in the figure:
Insert image description here
Finally log out the two and log in again and you will find that the problem has been solved!
If it is still not resolved, you can check whether the environment variable is not configured.

Guess you like

Origin blog.csdn.net/weixin_48160438/article/details/128543060