How to allow remote MySQL user access

Source: Internet
Author: User
How to allow remote MySQL user access (the experiment is successful in Ubuntu) 1. Log On with the root user and perform the following two steps (Note: [password] must be set to your root user

How to allow remote MySQL user access (the experiment is successful in Ubuntu) 1. Log On with the root user and perform the following two steps (Note: [password] must be set to your root user

How to allow remote MySQL user access (successful test in Ubuntu)

1. Log On with the root user and perform the following two steps (Note: [password] indicates the actual password of your root user ):

1.1 use mysql;

1.2 grant all on *. * TO 'root' @ '%' identified by '[password]' WITH GRANT OPTION

2. in Ubuntu. you can find my. in the cnf configuration file, use sudo emacs or sudo vi to open it and find the following lines:

Bind-address = 127.0.0.1

Change bind-address = 127.0.0.1 to your local IP address. For example, if my IP address in a LAN is 192.168.1.93, change it:

Bind-address = 192.168.1.93

3. in the last step, restart your mysql instance and run "sudo/etc/ini" in the command line under ubuntu. d/mysql restart ". If it is found that it is successfully closed and restarted, it indicates OK. If it is found that it cannot be started, it may be the step 2 of my. when the cnf file is incorrect, it may be that you have added a bind-address or typed the wrong word. The bind-address port can be changed to only one and cannot have multiple.

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.