Can't connect to MySQL server on localhost (10061) appears in MySQL login

Gussu caterpillar 2022-01-26 14:30:57 阅读数:819

connect mysql server localhost appears


System :Windows 10
MySQL:8.0.7

Restatement of the problem

Recently reinstalled Mysql, When logging in the next day, I found an error .
 Insert picture description here
Console login prompt :
 Insert picture description here

Solution

Open with administrative privileges CMD Command line window , Enter your local Mysql In the installation path of bin Catalog
Execution instruction :mysqld --initialize --user=root --console
 Insert picture description here
The red box in the figure is the password after initialization , Then use this password to log in successfully .
One more thing before that is to start Mysql, Start with command .
net start mysql
 Insert picture description here

If you change the password, use the command :set password='root'; Just OK 了
 Insert picture description here

Navigation


navicat Linked database display 2059 error 【 solve 】
copyright:author[Gussu caterpillar],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201261430543784.html