[Solved] There is a problem with mysql8.0 without password in Navicat connection

There is a problem with mysql8.0 without password in Navicat connection

**Problem: * * connect to mysql8.0 with Navicat, but the test connection fails
* * reason: * * when installing mysql8.0, there is no password set, and there is no random password under data in the MySQL installation directory

Solutions:
1. Stop the MySQL service
open the CMD as an administrator and close it or close the windows service page

C:\Users\xxx>net stop mysql`

2. As an administrator, open the CMD page and enter the following command to start MySQL without password

C:\Users\xxx>mysqld --console --skip-grant-tables --shared-memory

Take a look at the following screen:

3. Open a new CMD page and enter the following statement:

mysql> flush privileges; -- Modify Permissions
Query OK, 0 rows affected (0.16 sec)
 
mysql> ALTER USER "root"@"localhost" IDENTIFIED BY "123456"; -- Modify Password
Query OK, 0 rows affected (0.08 sec)

Then the login password is 123456

4. After setting, start the MySQL service normally, and use the user name and password to verify whether the setting is successful

Read More: