How to set up MySQL remote access

Source: Internet
Author: User

MySQL is not accessible via remote machine by default, remote access can be turned on by the following configuration

On the MySQL server side:

Execute mysql command into MySQL command mode,

SQL code
    1. mysql> use mysql;   
    2. MySQL >  grant   all   on  *.*  to  [ Email protected] '% '  identified  by   ' admin '   with   grant   option ;   
    3. #这句话的意思   computers that allow any IP address ( %  that's what it says)   Use the admin account    and password (admin) to access this mysql server   
    4. #必须加类似这样的帐户 to log on remotely.   
mysql> use mysql;mysql> grant all on * * to [e-mail protected] '% ' identified by ' admin ' with GRANT OPTION; #这句话的意思, allow Any IP address (above the percent of this meaning) of the computer with the admin account  and password (admin) to access the MySQL server# must be similar to such an account before you can log on remotely. The root account cannot be logged on remotely and can only be logged on locally

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

How to set up MySQL remote access

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.