I have a AWS RDS instance running on the free tier, and am trying to use mysql command to connect it, just to play with it.
The command I used is
mysql -h XXX.XXX.us-west-2.rds.amazonaws.com -P 3306 -u username -p
but after a while it returns
ERROR 2003 (HY000): Can't connect to MySQL server on 'XXX.XXX.us-west-2.rds.amazonaws.com' (60)
The instance I am running on AWS is MySQL, and I used the correct server address when connecting. Can anyone tell my why the connection does not get through?
Related
I'm using the command line prompt on my Windows computer to connect to my Azure MySQL server.
hostname=flashguard.mysql.database.azure.com
username=damiboyflashguard123
port=3306
I entered following on my cmd
mysql -h flashguard.mysql.database.azure.com -P 3306 -u damiboyflashguard123 -p
and entered the password. Then I'm getting following error,
ERROR 2003 (HY000): Can't connect to MySQL server on
'flashguard.mysql.database.azure.com:3306' (10060)
By the way I checked my firewall settings, and it shows firewall is approving on 3306 port requests as follows.
I installed MySQL client in my local machine and tried connecting to Azure mySQL client via command line terminal and was connected successfully:-
ERROR 2003 (HY000): Can’t connect to MySQL server on
‘flashguard.mysql.database.azure.com:3306’ (10060)
Make sure your MySQL server name with username and password does not have any syntax missing or spelling errors. Add your local machine’s IP to the allowed list of Azure MySQL servers like below:-
Make sure your MySQL server is in a ready state and also try to connect to your MySQL server from your Azure Portal to check the connectivity.
Verify your connecting string from Azure Portal like below:-
I ran the above command in my local machine’s command line terminal and I got connected to the azure MySQL server successfully like below:-
mysql -h server-name.mysql.database.azure.com -u xxxxconuser -p xxxxxxxxxn#123
Output:-
When I removed the Client IP from the azure MySQL Networking tab, I got the same error code as yours, refer below:-
Error:-
Verify if you’re connected to any VPN that is restricting you from connecting to the MySQL server on Azure.
I using the command: mysql -u rb_remote -h ec2-35-169-41-113.compute-1.amazonaws.com -p to attempt to connect to an EC2 mysql db. I can connect perfectly fine with mysql -u root -p when I ssh into the instance.
I am getting a generic error: Can't connect to MySQL server on 'ec2-35-169-41-113.compute-1.amazonaws.com' (61)
Here is what I have done to attempt to connect:
In the AWS secutiry group I set inbound rules to accept all 3306 tcp 0.0.0.0/0, ::/0
created an new mysql user "rb_remote" and enabled all mysql privileges
in /etc/my.conf I set the "bind-address" to my remote IP address
Does anyone have any other suggestions. I have been stuck on this all day.
I have a remote SQL database (RDS) on Amazon Web Services which I am attempting to connect to via the Linux terminal.
Having run the following command, substituting each value:
sudo mysql -u <username> -h <endpoiont> -P <port> -p
and then entered my password, I get the following error message:
ERROR 2003 (HY000): Can't connect to MySQL server on '<endpoint>' (111)
This used to work up to a few weeks ago and I have not changed any of the AWS permissions and security settings since. I also changed the password since this error but this did not solve the problem.
My application itself can connect to the DB, only I cannot connect via the Linux terminal.
Some solutions that I have read related to making changes to local files but this SQL database is hosted on AWS, not on my local machine.
Any suggested solutions are welcome.
I made ElasticBeansTalk App on AWS. I couldn't access rds via command console.
mysql -uusername -p -h vegeweldb.xxxx.ap-northeast-1.rds.amazonaws.com
ERROR 2003 (HY000): Can't connect to MySQL server on 'vegeweldb.xxxx.ap-northeast-1.rds.amazonaws.com' (60)
Also, can't access ec2 using ssh.
ssh -i some.pem ec2-user#ec2-xx-xxx-xxx-164.ap-northeast-1.compute.amazonaws.com
Permission denied (publickey).
I made key pair on AWS. I can't figure out why. I'd appreciate if you give some advice.
BTW here's current configuration.
I am new to AWS. I followed AWS quick start documentation and created my Web server and Database server. I can connect my Web server from my browser and ssh client. But i couldn't connect my MYSQl database from SQL workbench or MySQL yog.
I tried connecting it through command line from my web server its connecting. I thought its due to some user access problem and tried changing the user access by query and it says access denied for giving grant permissions. please suggest me the how to connect to AWS RDS from remote machine(any sql gui tool).
I'm not sure if it's proper way, but you can create ssh tunnel like that:
ssh -N -L 6033:RDSendpoint.rds.amazonaws.com:3306 -i /path/tokey/aws-key.pem ec2-user#EC2IPAddress
And then connect using mysql -h 127.0.0.1 --port=6033 -u yorrdsuser -p from local.