[MySQL] Solve the flashback problem when logging in to MySQL

When you open MySQL, you may encounter the problem of crashing after entering the password on the login interface.

Usually when we write code, although an error will be reported, the cause of the error is given to us. We can deal with it according to the cause of the error. But MySQL crashes directly, so we don’t know the error message. This has caused most people to encounter In this case, there is no way to start. Here I will teach you how to view the error message of MySQL

Check the error message:

  1. Open a command prompt with cmd
  2. Find MySQL in the search
  3. Right click to open the file location
  4. Drag any of these shortcuts directly into the command prompt
  5. If step 4 cannot be completed, you can right-click properties and copy and paste all the information in the target to the command prompt, the effect is the same
  6. At this time, if you run it again, you can see the error message

Two common error messages:

  1. MySQL password error
  2. Can't connect to MySQL server

First use cmd to open the command prompt,
insert image description here
find MySQL in the search,
insert image description here
right-click to open the file location
insert image description here
, and then enter this interface,
insert image description here
directly drag any one here to the command prompt,
insert image description here
this is the effect of dragging it into the display correctly.
If you pay attention here 如果拖不进去, you can right-click the property
insert image description here
to set the target Copy and paste all the information in the command prompt to the command prompt, the effect is the same

After the above is completed, press Enter, and such a screen will appear.
insert image description here
Run it here, and there will be an error message

说两个常见的错误信息:1.密码错误 2.无法连接到MySQL服务器
The first is the prompt message of wrong password:
insert image description here
there will be such an error message: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Simply put, the error message here means that my password is wrong. Just enter the correct password


insert image description here
This is an error message that cannot connect to the server: Here is an error message ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
that means that it cannot connect to the MySQL server.
To solve this problem, find the service, and then open it.
insert image description here
Find MySQL here
insert image description here
and right-click to enable it.

Thank you for watching! I hope this article can help you!
Column: "Speedthrough MySQL" is constantly being updated, welcome to subscribe!
"Wish to encourage you and make progress hand in hand!"
insert image description here

Guess you like

Origin blog.csdn.net/m0_63463510/article/details/129672413