Tag Archives: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

[Solved] MYSQL8 Error: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

1:stop serves: net stop mysql
2:remove serves: mysqld -remove mysql
3:E:\zyf\mysql8\bin>mysqld -initialize-insecure -user=mysql
4:E:\zyf\mysql8\bin>mysqld -install mysql
5:E:\zyf\mysql8\bin>net start mysql
6:E:\zyf\mysql8\bin>mysql
Error: ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO)
7:E:\zyf\mysql8\bin>mysql -uroot -p
Enter password: *******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10  Then you can log in normally!
If you encounter Navicat can’t connect to mysql service: Error reported.

You can start by logging into mysql in a DOS command window at
Then run: mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘root123’;
Query OK, 0 rows affected (0.07 sec)
Then you can log in normally.

[Solved] MySQL ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

 

MySQL display error 2003 (HY000): can’t connect to MySQL server on ‘localhost’ (10061) solution

solution: the first step is to enter the bin directory of MySQL

cd C:\Program Files\MySQL\MySQL Server 5.5\bin

Input:

mysqld --skip-grant-tables

Open a new CMD, and then enter the bin directory:

cd C:\Program Files\MySQL\MySQL Server 5.5\bin

Input:

mysql -uroot

The problem has to be solved