Resolve error: 1130-host xxx is not allowed to connect to this MARIADB server

Source: Internet
Author: User
Tags flush

Built on the cloud server mariadb (MARIADB is a branch of the MySQL source code), but remote links do not.

First, you want to make sure that the server security group 3306 ports are open.

In the case of ensuring that the port is open, if the error code 1130-host the XXX is isn't allowed to connect to this MARIADB server, the permission issue is indicated. As shown in figure:


There are two ways to fix this:

1. Authorization Act

Grant all privileges in *.* to ' user ' @ '% ' identified by ' password ' with Grant OPTION; %: means to connect to MySQL server from any host

FLUSH privileges;

Or

Grant all privileges "*.* to ' user" @ ' 116.30.70.187 ' identified by ' password ' with GRANT option;//represents connecting from any host to the MySQL server from a specified IP

FLUSH privileges;


2. The Table act

Your account may not be allowed to log in remotely, only in localhost. This time as long as the computer in localhost, login mysql, change the "MySQL" Database in the "User" table in the "host" item, from "localhost" renamed "%"
Mysql-u root-p
Mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ' and host= ' localhost ';
Mysql>select host, user from user;
Then restart the MySQL service. Or execute a statement mysql>flush rivileges to make the modification take effect.


So that's it, you can link the database remotely.



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.