Problem: A new MySQL database is installed in the server, the result is not connected to the remote computer, and prompted "Server connection Error host ' XXX ' is not allowed to connect to this MySQL server".
(The database default port is already open in the case of a firewall)
FIX: MySQL is a newly installed, not open remote connection caused by, that is, remote permissions problems.
GRANT All Privileges on *. * to ' testuser '@ '%' by'testpassword' with GRANT OPTION;
(Parameter: With GRANT option refers to the ability to give permission to be granted, allowing the person to grant that right to other persons)
(parameter:% refers to any host that can be connected remotely)
(parameter: All privileges refers to assigning all permissions to a specified user)
(Parameter: * * is a full table authorization for all databases.) And Userdata.*, the previous userdata refers to the database name, which represents the full table authorization for the UserData database)
In addition, the blog is very clear: http://www.cnblogs.com/xyzdw/archive/2011/08/11/2135227.html
MySQL Remote connectivity issues