Trying to connect to mysql and get an error: it is not allowed to connect to this MySQL serverConnection server closed by another host

Hi, I am running two instances of rhel in ec2. now I'm trying to make $ telnet ec2-184-73-58-163.compute-1.amazonaws.com 3306

Trying 10.193.139.147...
Connected to ec2-184-73-58-163.compute-1.amazonaws.com.
Escape character is '^]'.
bHost 'domU-12-31-39-05-3D-E6.compute-1.internal' is not allowed to connect to this MySQL serverConnection closed by foreign host.

I'm a newbie. not get what to do now? Please, help.

+5
source share
3 answers

You cannot connect to remote MySQL unless you are the white specified in the MySQL user privilege table.


Suppose your IP address is equal 199.255.209.168, and you are trying to enter the MySQL daemon running by IP address 123.238.18.47using a username rakmanwith some password

$ mysql -h 123.238.18.47 -u rakman -p
Enter password:
ERROR 1130 (HY000): Host '199.255.209.168' is not allowed to connect to this MySQL server

mysql [rakman] @[ IP-] MySQL, 123.238.18.47. , rakman@199.255.209.168 ( rakman@%, MySQL , ), MySQL, 123.238.18.47.

MySQL , , 'xxx.xx.xxx.xxx' MySQL. .

$ mysql -h 123.238.18.47 -u rakman -p
Enter password:
Welcome to the MySQL monitor.
+10

mysql

ips,

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' WITH GRANT OPTION;

ip

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'youripaddres' WITH GRANT OPTION;

+5

I'm not that good in this area either, but I think this link may help you a bit. This was my recommendation when I had problems with MySQL.

just try it. Hope this works. Sourceforge.net

+2
source

All Articles