MySQL Error:host isn't allowed to connect to this MySQL server

Source: Internet
Author: User
Tags mysql in

The following error occurred while accessing MySQL in the virtual machine:

Cause: The MySQL user does not allow remote logins

Resolution: Authorization

1> allows users to connect to MySQL server from any host

GRANT  All Privileges  on *. *  to ' username '@ '%' by'password'  WithGRANTOPTIONprivileges;

2> allows users to access MySQL server from a specified IP

Where host is a specific IP address

GRANT  All Privileges  on *. *  to ' username '@'host'by'password'  with GRANT OPTION  Privileges;

3> allows users to access MySQL server specified database from a specific IP

Where host is a specific IP address

GRANT  All Privileges  on dbname. *  to ' username '@ 'host'by'password' with GRANT OPTION  Privileges;

MySQL Error:host is not 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.