navicate Connect to the remote database (Recommended tutorial: navicat tutorial)
1.Make sure your remote The database allows you to access locally, that is, authorize this database grant all privileges on *.* to 'username'@'your host address' identified by 'your password'; (that is, log in to mysql on the remote server , and then authorize your local host address)
2.Then execute flush privileges;
If the above does not work, it may be the space provider of your remote server It is set for the security of its own server. Remote management is prohibited to avoid causing the collapse of the entire database server.
The following are the steps for me to connect to the remote database locally:
If your computer is connected to the Internet, first take a look at your public network IP and enter it in the browser ip,
Then log in to the database on your remote server and authorize the ip you queried,
Then enter the command: flush privileges;
So that you can open the command line (cmd) on a Windows computer and enter mysql -u the user name you created on the remote server -p your password -h your remote server ip:
Use navicat for mysql to log in to the remote database, log in directly in the routine:
connection succeeded!
The above is the detailed content of How to connect navicat to remote database. For more information, please follow other related articles on the PHP Chinese website!