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.