Sqlyog fails to connect to Alibaba Cloud MySQL remotely

Recently, I passed a student certification and used a server in Aliyun. I didn't expect that after installing MySQL, it would be a long time to connect remotely, so I recorded it.

The port and everything are allowed, but it still doesn't work. After Baidu learned that it did not grant access rights to remote users,
log in to mysql on the server side and grant access rights:
Insert picture description here

mysql> grant all privileges on *.* to '用户'@'ip' identified by '密码' with grant option;
mysql> flush privileges;

In the first sentence, *.* represents all database tables. If you want to give all IP permissions, "ip" is written as "%", so the first sentence sql means to give "users" from all IP addresses, " "Password" login user has all operation authority for all database tables.
The second sentence sql, refresh permissions.
Then restart MySQL to take effect.

Refer to this article: Solution to the failure of remote connection to Alibaba Cloud MySQL

Guess you like

Origin blog.csdn.net/weixin_42118981/article/details/109464600
Recommended