Error: 1130-host allowed to connect to this MySQL server open MySQL remote connection does not use localhost

Source: Internet
Author: User

Method One: Authorization law:

Run on the machine where MySQL is installed:

1, d:/mysql/bin/>mysql-h localhost-u root//This should allow access to the MySQL server

2, Mysql>grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION; Give any host access to the data (note that the semicolon ends the SQL statement)

3, Mysql>flush privileges; The modification takes effect (note that the semicolon ends the SQL statement) and attempts to connect to MySQL on the navicat to connect successfully.

4, mysql>exit; Quit MySQL server, can not execute,

This will allow you to log in as root on any other host!

Method Two (not personally tested, to be studied): Change the table method:

The account may not be allowed to log in remotely, only on localhost. This time, as long as the computer on the localhost, log in to MySQL, change the "MySQL" Database in the "User" table "host", from "localhost" to "%"

Mysql-u root-pvmwaremysql>use MySQL;

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

Mysql>select host, user from user;

Error: 1130-host allowed to connect to this MySQL server open MySQL remote connection does not use localhost

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.