[Ilugc] MySQL - unable to connect to MySQL db from another host on same LAN

  • From: akk.saravanakumar@xxxxxxxxx (Saravanakumar Karunanithi)
  • Date: Wed, 6 Aug 2014 12:36:33 +0530

Does your security group allow the mysql port 3306?

is IPTables blocking the port?

check using the following command



*telnet aws-appsrv 3306  *


On Wed, Aug 6, 2014 at 12:09 PM, Arun Khan <knura9 at gmail.com> wrote:

I have 2 AWS instances (CentOS 6.5 64bit AMI)
(a) Apache, PHP, mysql client package  (IP = A, alias name aws-appsrv)
(b) mysql-server (IP = B alias name aws-dbsrv).

I have configured mysql server on B to accept connections on 3306 from A.
I have also configured mysql server on B to accept connections for
'root' user from A both with IP number (A) and alias name
(aws-appsrv).

On mysql server (B)
mysql> select user,host,grant_priv from user;
+------+------------+------------+
| user | host       | grant_priv |
+------+------------+------------+
| root | localhost  | Y          |
| root | aws-appsrv | Y          |
| root | 127.0.0.1  | Y          |
| root | 10.0.0.244 | Y          |
+------+------------+------------+

On aws-appsrv (A), when I connect to mysql server on B as 'root' user,
I get the following error.

# mysql -u root -h aws-dbsrv -D mysql -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'aws-appsrv' (using
password: YES)

I have searched for a solution but have not come across one that meets
my use case scenario.

What am I missing?

-- Arun Khan
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
ILUGC Mailing List Guidelines:
http://ilugc.in/mailinglist-guidelines




-- 
Thanks & Regards,
Saravanakumar Karunanithi

Other related posts: