MySQL Remote connection Host * is not allowed to connect to this MySQL server

Source: Internet
Author: User
Tags phpmyadmin

Original link: http://www.111cn.net/database/mysql/45230.htm

If MySQL does not support remote connections, you will get a hint: The error code is 1130,error 1130:host * isn't (www.111cn.net) allowed to connect to this MySQL server,

There are 2 ways to resolve this issue:

localhost changed to%

Go to the MySQL bin directory

Mysql-u root-p

Mysql>use MySQL;

Mysql>update User Set host = '% ' where user = ' root ';

Mysql>flush privileges;

Specific analysis

1, after the computer log in MySQL, the "MySQL" Database in the "User" table "host", from "localhost" to the '% '.

Mysql>
Mysql>use MySQL;
Mysql>select ' host ' from user where user= ' root ';

#查看mysql库中的user表的host值 (Host/IP name for connection access)

Mysql>update User Set host = '% ' where user = ' root ';

#修改host值 (Increase the host/IP address as a wildcard%, and of course, you can also directly add a specific address if error 1062 (23000) occurs when you execute the UPDATE statement: Duplicate entry '%-root ' for key ' PRIMARY ' ERROR, requires select host from user where user = ' root ';
Check to see if the host has a% value, and if so, directly execute the following flush privileges;

Mysql>flush privileges;
Mysql>select host,user from user where user= ' root ';
Mysql>quit

A different approach

If you are using phpMyAdmin we can login phpMyAdmin and then enter in the rights management, here will see all the users, you find the root user click Modify, and then change the domain to the% number can be (note that you must be the root user login Oh, Otherwise, it is not modifiable)
From:http://www.111cn.net/database/mysql/45230.htm

MySQL Remote connection Host * 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.