I'm having issues connecting to my local mysql server currently, but I need help in being able to connect to mysql from other instances also.
Background: I have a java service that is installed on a single instance, along with mysql. Other instances will also have this java service that need to connect to mysql.
Currently my /etc/hostname shows:
What should I be using to connect? I tried
localhost just to see if it could connect, and it didn't work. I tried just the local ip also, and that didn't work either.
If I just try and connect to mysql locally this works:
mysql -u root -p123
But this fails:
mysql -h localhost -u root -p123
(So it fails whenever I add the -h switch, localhost, 127.0.0.1 or the internal ip addresses all fail with the error: ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using password: YES)
I tried just the local ip, that didn't work, and the string 'ip-xx.xx.xx.xxx' and that didn't work either.
I'm clearly doing something wrong, what should I do?