I can connect to my mysql database through command line when specifying the exact IP:
mysql -u root -p -h 172.31.110.55
I am on aws, but when I try to connect using the DNS, I get this error:
$ mysql -u root -p -h ip-172-31-110-55.us-west-2.compute.internal
ERROR 1045 (28000): Access denied for user 'root'@'ip-172-31-110-55.us-west-2.compute.internal' (using password: YES)
I double checked that I am typing the password correctly
mysql> SHOW GRANTS;
+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@ip-172-31-110-55.us-west-2.compute.internal |
+---------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip-172-31-110-55.us-west-2.compute.internal' IDENTIFIED BY PASSWORD '****HASH_OF_PASSWORD****' |
+---------------------------------------------------------------------------------------------------------------------------------------------------------+
what can be the issue? I believe that this is the reason I can also get error when trying to access the database remotely when using phpmyadmin
MySQL said:
#1045 - Access denied for user 'root'@'ip-172-31-110-55.us-west-2.compute.internal' (using password: YES)
my phpmyadmin config file:
/* Remote Server */
$i++;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host'] = 'myinstance.123456789012.us-east-1.rds.amazonaws.com';
$cfg['Servers'][$i]['verbose'] = 'Remote Server Name';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '**********';
$cfg['Servers'][$i]['hide_db'] = '^(mysql|performance_schema|innodb|information_schema)$';