Host * is not a allowed to connect to this MySQL server

Source: Internet
Author: User

Login command: Mysql-uroot-proot

Select User,host,password from Mysql.user;

                                                                                                

2, Mysql>grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION

Give any host access to data

For example, if you want to myuser use MyPassword to connect to a MySQL server from any host.

GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;

If you want to allow users to connect to the MySQL server from a host myuser IP 192.168.1.6 and use MyPassword as the password

GRANT all privileges on * * to ' myuser ' @ ' 192.168.1.6 ' identified by

' MyPassword ' with GRANT OPTION;


flush Privileges; the essence of the command is to extract the user information/permission settings from the current users and Privilige tables from the MySQL library (the built-in library of the MySQL database) into memory. MySQL user data and permissions have been modified, you want to "do not restart the MySQL service" in the case of direct effect, then you need to execute this command. Usually after you modify the root account settings, afraid to restart after the login can no longer, then directly after the flush to see whether the permissions are set to take effect. Without risking too much.


This article is from the "Nothing-skywalker" blog, please be sure to keep this source http://tianxingzhe.blog.51cto.com/3390077/1653644

Host * is not a 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.