Remote MySQL Error 1130 (HY000): Host ' 172.17.42.1 ' is not allowed to connect to this MySQL server

Source: Internet
Author: User

ERROR 1130:host ***.***.***.*** isn't allowed to connect to this MySQL server
Indicates that the connected user account does not have remote connection permissions and can only log on natively (localhost). You need to change the host entry in the user table in the MySQL database
Rename localhost to%
Specific steps: Login to MySQL first use MySQL;
There was an error when the update was provided in the other way.

mysql> Update user set host= '% ' where user = ' root ';

ERROR 1062 (23000): Duplicate entry '%-root ' for key ' PRIMARY '
The host information for the following database is then viewed as follows:

Mysql> Select host from user where user = ' root ';
+-----------------------+

|host|

+-----------------------+

|% |

| 127.0.0.1 |

| Localhost.localdomain |

+-----------------------+
3 The rows in Set (0.00 sec) Host already has this value, so run the command directly:

The code is as follows: Mysql>flush privileges;

Then connect with mysql-uroot-h***.***.***.*** ... Success!!

This article refer to http://www.jb51.net/article/31902.htm

Remote MySQL Error 1130 (HY000): Host ' 172.17.42.1 ' is not allowed to connect to this MySQL server

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.