MySQL How to open remote connections

Source: Internet
Author: User

Original Address

Configure MySQL to allow remote connection methods

By default, MySQL only lets you log on locally, and if you want to turn on remote connections, you need to modify the/etc/mysql/my.conf file.

I. Modification of/ETC/MYSQL/MY.CONF
Find bind-address = this line
Change to bind-address =

Ii. granting permissions to users who need to log on remotely
1. New user remote connection MySQL database
Grant all on * * to [e-mail protected] '% ' identified by ' 123456 ' with GRANT option;
Flush privileges;
A computer that allows any IP address (% to allow any IP address) to access this MySQL server with the admin account and password (123456).
Note that the admin account does not have to exist.

2, support the root user to allow remote connection to MySQL database
Grant all privileges on * * to ' root ' @ '% ' identified by ' 123456 ' with GRANT option;
Flush privileges;

Third, view system users

MySQL How to open remote connections

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: 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.