1130-host ' 192.168.x.x ' isn't allowed to Conneciton to this MySQL server

Source: Internet
Author: User

Navicat for mysqlline connection mysql times wrong as follows

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/19/wKiom1VztBzDgfKqAACQ8CWwlj0252.jpg "title=" 1.png " alt= "Wkiom1vztbzdgfkqaacq8cwwlj0252.jpg"/>

Cause: Root user permissions are insufficient,

Workaround: Modify the root connection permissions, that is, "localhost" to "%",% for all hosts


Method One: The Table method

Steps:

[Email protected] ~]# mysql-u root-p

mysql> show databases;

mysql> use MySQL;

Mysql> Show tables;

Mysql> select Host,user from user; Querying the connection scope of the root user in the current user table

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/19/wKiom1VzstzyY2cFAAD8ArxumaM235.jpg "title=" 05.png "alt=" Wkiom1vzstzyy2cfaad8arxumam235.jpg "/>

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

Mysql> select Host,user from user;

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6E/15/wKioL1VztLvRsT58AADyFTOWVnw348.jpg "title=" 06.png "alt=" Wkiol1vztlvrst58aadyftowvnw348.jpg "/>

mysql> flush Privileges; Refresh MySQL system permissions related table, this step must have oh, otherwise will error

Mysql> select Host,user from user;


This will be OK.

===================================================================================

After this method has been verified, the MySQL client can connect normally, but MySQL goes from the command, so it is recommended to use the method two

===================================================================================


Method Two: Modify the Permission method


Steps:

Mysql> Grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with GRANT OPTION;

mysql> flush Privileges;


To this OK, the client can connect normally Mysql,mysql command line can also enter normally.



This article is from the "Cock Silk counter attack" blog, please make sure to keep this source http://5731674.blog.51cto.com/5721674/1659353

1130-host ' 192.168.x.x ' isn't allowed to Conneciton to this MySQL server

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.