Common remote connectivity issues with databases

Source: Internet
Author: User
Tags mysql command line

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.