Configure MySQL to allow external IPs to log on

Source: Internet
Author: User

These two days in a database project, using MySQL, the need to remote access to MySQL through the external IP, found that the default MySQL is not allowed remote access, need to do a simple configuration.

As follows:

1. Open a terminal (CMD) input

Mysql-u User name-p password

# (if there is no MySQL command, you go to the MySQL bin directory to execute)

2. Assigning Permissions:

Grant all privileges on * * to ' login name ' @ '% ' identified by ' login password ';

#说明 here is simply to say that all permissions are assigned to all external IP access, but this is not in accordance with the security principle, but can solve the problem.

# ' login name ' @ '% ' means login to this MySQL username,% refers to any IP, if just specify a specific IP directly to write IP. such as 192.168.1.111

3. Refresh Permissions

Flush privileges;

Configure MySQL to allow external IPs to log on

Related Article

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.