• 周四. 10 月 3rd, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

The local MySQL workbench remotely connects to MySQL in the cloud server

King Wang

1 月 3, 2022

Personal blog address :http://alexaccele.github.io/

Start by opening MySQL workbench Click… On the home page MySQL Connections Edge + Number

Fill in the corresponding information in the pop-up box

The above   default schema Express , If you want to connect to a specific database by default , Then fill in the name of the database

And then click Test connection  

If an error message is displayed :host … is not allowed to connect to this MySql server, On the remote server MySQL Remote connection not allowed

You can modify the… On the server in the following ways MySQL,

 

for example , Give Way The user is called myuser Use The password for mypassword Connect from any host to mysql The server

GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’%’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

FLUSH   PRIVILEGES;

Allow users myuser from ip by 118.184.1.3 Of hosts connected to mysql The server , And use mypassword As password

GRANT ALL PRIVILEGES ON *.* TO ‘myuser’@’118.184.1.3’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

FLUSH   PRIVILEGES;

If you want to allow users myuser from ip by 192.168.1.6 Of hosts connected to mysql The server Of dk database , And use mypassword As password

GRANT ALL PRIVILEGES ON dk.* TO ‘myuser’@’192.168.1.3’ IDENTIFIED BY ‘mypassword’ WITH GRANT OPTION;

FLUSH   PRIVILEGES;

 

 

After the above modifications , Test the connection again if it shows

The test connection is successful , Pay attention to click Test Connection Lateral ok Just officially connected to

And then back to MySQL Workbench Home page , You’ll find that there’s a new connection

发表回复