Two ways to resolve MySQL remote connection failure

Source: Internet
Author: User

---restore content starts---

(This is reproduced others, because I think it is very useful, each time is the reference to the second method to solve, whether you can not hear, first say thank you!) Also remember to make it easy for everyone to see)

MySQL solves two kinds of methods that cannot be accessed remotely, and needs a friend to refer to:

1, in the/ETC/MYSQL/MY.CNF [MYSQLD] paragraph commented out bind-address = 127.0.0.1
2, log in with Mysql-uroot-p MySQL, and then use the following methods to open remote access permissions:


Method 1:mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>flush rivileges;


Method 2:mysql>grant all privileges on * * to ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT OPTION;

Reproduced original address: http://www.jb51.net/article/35267.htm

---restore content ends---

Two ways to resolve MySQL remote connection failure

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.