MySQL Set remote access

Source: Internet
Author: User

MySQL remote access settings allow remote connection to local database.

1. Go to the local MySQL installation directory under bin , log in to MySQL,

2. Switch the database to the built-in database named "MySQL" and you can see a table named "User" below.

3. Execute SQL statement: select Host,user,password from User;

You can see all the user names, passwords and corresponding hosts that can be logged into this database. The default is local access only.

4. Modify settings for remote access.

Execute statement: GRANT all privileges on * * to ' root ' @ '% ' identified by '123456' with GRANT OPTION; (Note: The red place should be modified to the local database login password)

Execute statement: FLUSH privileges; (Refresh MySQL's system permissions related table)

Complete.

The settings are complete to see the effects. Root user access to host is no longer restricted. You can now complete the remote connection.

PS: If you do not have normal access at this time.

Note Modify the local firewall settings. Go to the Control Panel and locate the firewall settings---Control Panel \ All Control Panel items \ Windows firewall \ Allowed programs, check public.

Connect again and try again.

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.