Connect to MySQL times: Message from server: "Host ' 192.168.76.89 ' isn't allowed to connect to this MySQL server

Source: Internet
Author: User

Treatment scenarios:

1, first connect to the MySQL database with localhost, and then use MySQL's own database MySQL;

Use MySQL;

2. Execution: Select host from user where user = ' root '; found that the value of host is localhost.

So get rid of its value: Update user set host= '% ' where user = ' root ';

3, after the completion of the modification, implementation: flush privileges;

When the modifications are in effect, they can be connected to the MySQL database properly with the IP address or localhost when they are configured again.

The operation is as follows:

mysql> use MySQL

Reading table information for completion of table and column names

Can turn off this feature to get a quicker startup with-a

Database changed

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

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

| Host |

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

| localhost |

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

1 row in Set (0.00 sec)

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

Query OK, 1 row Affected (0.00 sec)

Rows matched:1 changed:1 warnings:0

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

+------+

| Host |

+------+

| %    |

+------+

1 row in Set (0.00 sec)

mysql> flush Privileges;

Query OK, 0 rows Affected (0.00 sec)

Mysql>

Connect to MySQL times: Message from server: "Host ' 192.168.76.89 ' isn't allowed to connect 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.