Turn on MySQL remote access method

Source: Internet
Author: User
Tags mysql command line

By default, the MySQL database is not allowed to be accessed remotely.

You need to use the following steps to turn on MySQL remote access permissions:


First mysql-u root-p login mysql command line,

then use MySQL;


After opening permissions:

GRANT all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;

(This step can be done via select User, host from user; view below)


Effective Permissions:

Flush privileges;


After this setting, use the Mysql-h IP address on the other machine-U root-p to log in to the MySQL database.


#注意: This may still not work, it is possible to set the bind-address=127.0.0.1 in mysql.cnf, comment out the restart MySQL service can be.


Turn on MySQL remote access method

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.