The problem with inaccessible databases is typically encountered when a remote connection makes a Web site deployment server, which is usually caused by a database that does not have remote access permission, as follows:
1. After online operation via remote connection database, execute MySQL command line: Update user set host= '% ' where user= ' root ', so that root can connect to the database remotely.
2. Query the items in the User table: Select host, user from user. View the updated configuration in the user table.
3. Execute flush Privileges (Note: The flush privileges command essentially functions to extract the user information/permission settings from the current users and Privilige tables from the MySQL library (the built-in library of the MySQL database) into memory. MySQL user data and permissions have been modified, you want to "do not restart the MySQL service" in the case of direct effect, then you need to execute this command. Usually after you modify the root account settings, afraid to restart after the login can no longer, then directly after the flush to see whether the permissions are set to take effect. Without risking too much. )。
Try connecting again should be able to.
Common remote connectivity issues with databases