Today, under Win32, the following error occurred while logging in to MySQL via Navicat: Don't even think about it, it must be MySQL's access rights issue. First, telnet to the Linux server via the terminal (I use SSH) and, for security reasons, change the root user password for MySQL data:?
1 2 3 4 5 6 7 8 9 10 11 |
[plain] [[email protected] ~]$ mysqladmin -u root
password 123456 [[email protected] ~]$ mysql -uroot -p Enter
password
: Welcome
to the MySQL monitor. Commands
end with ;
or \g. Your MySQL
connection id
is 13 Server version: 5.0.77 Source distribution
Type
‘help;‘ or ‘\h‘ for help. Type
‘\c‘ to clear the buffer.
mysql> |
The second step is to query the rights of all users in MySQL: As expected, the root user of MySQL can only be accessed through this machine, let's change the permissions:?
1 2 3 |
[plain] mysql> update ` user ` set `host` = ‘%‘ where ` user ` = ‘root‘ ; mysql> flush privileges ; |
Test it, the operation is successful, now you can remotely manage the MySQL database through the terminal.