Message from server: "Host ' xxx ' isn't allowed to connect to this MySQL server resolution

Source: Internet
Author: User

Workaround:   1. Change the table method.    may be your account is not allowed to login from remote, only on localhost. This time, as long as the computer in localhost, log in to MySQL, change the "MySQL"   database "user" table "host", from "localhost" renamed "%"   mysql -u Root-pvmwaremysql>use MySQL;   www.2cto.com   mysql>update User Set host = '% ' where user = ' root ';   mysql>select host, User from User;  2. Authorization law.    For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.   grant all privileges on * * to ' myuser ' @ '% ' identified by ' MyPassword ' with GRANT option;  flush &NB Sp privileges;   if you want to allow the user myuser to connect to the MySQL server from the IP 192.168.1.6 host and use MyPassword as the password   grant all Privileges on * * to ' myuser ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT OPTION;   www.2cto.com   flush   privileges;   If you want to allow users to connect to the MySQL server's DK database myuser from the IP 192.168.1.6 host, and use MyPassword as the password   grant all privileges on dk.* to ' MyUser ' @ ' 192.168.1.3 ' identified by ' MyPassword ' with GRANT option; &nbsp FLUSH   privileges;   I used the first method, just started to find no, in the online check, less execute a statement mysql>flush rivileges make the changes take effect. It's okay     Another way, but I didn't try it myself, looking for it on the csdn.net, you can see .   running on the MySQL-installed machine:   www.2cto.com   1, D:\mysql \bin\>mysql   h   localhost  -u   root//This should allow access to MySQL server   2, mysql>grant   All   Privileges   on   * *   to   ' root ' @ '% '   with   GRANT   OPTION//give any host access to data   3, Mysql>flush   privileges//Modify effective   4, Mysql>exit//exit MySQL server    This will allow you to log in as root on any other host!  

Message from server: "Host ' xxx ' isn't allowed to connect to this MySQL server resolution

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.