Navicat for mysql solution to unsuccessful connection: 1. Log in to mysql; 2. Execute the command [ALTER USER 'root'@'localhost' IDENTIFIED] to skip password verification; 3. Refresh permissions.
Step one: Open Command Line Client
(Learning video sharing: mysql video tutorial)
Step 2: Enter the mysql password and press Enter. It is the password set when installing mysql. Just enter the password without semicolon
Step 3: Enter ALTER USER ' root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysql's password'; Press Enter Don't miss the semicolon behind it The password for mysql is the password set when installing mysql
Step 4: Enter FLUSH PRIVILEGES; Enter (don’t miss the semicolon at the end)
Recommended graphic tutorial: mysql tutorial
The above is the detailed content of What should I do if the connection to navicat for mysql fails?. For more information, please follow other related articles on the PHP Chinese website!