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.
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.