I am not able to connect to a fresh instance of AWS RDS MySQL
mysql -h <host>.rds.amazonaws.com -P 3306 -u admin -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '<host>.rds.amazonaws.com' (111)
The credentials are correct.
Here are the inbound security rules
I have even set "Public Accessibility" to "Yes" (which I don't want to) but no luck. Any help? Thanks
EDIT 1:
Output of telnet after rebooting rds instance :
telnet host.rds.amazonaws.com 3306 Connecting To
host.rds.amazonaws.com...Could not open connection to the host, on
port 3306: Connect failed
Route Table:
Network ACL:
Related
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 am new to AWS RDS and I am trying to connect MySQL workbench to the instance on AWS. I want to have full admin access in the Database.
Connection Method: Standard TCP/IP over SSH
SSH Hostname: (AWS given endpoint)
SSH UserName: (not sure which user name they are asking for...ec2 or root?)
SHH Password:
SSH Keyfile: assuming this is the .pem file from AWS
MySQL HostName: 127.0.0.1
MySQL ServerPort: 3306
username: mysql username
password: mysql username password
Very new to this so any help would be greatly appreciated!
Thanks,
OK_Sooner
Be sure that security group of your instance accept connections from your ip. And as John Rotenstein said - you don't need to connect by ssh. Just connect to port 3306.
I am trying to remotely connect to a MySQL server. I have followed advice from (1) and setup a user on the ip address I will be remotely accessing from.
user$ mysql -u TestUser -p -h 129.169.66.149
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '129.169.66.149' (60)
I have checked and the port (default, 3306) is correct and the ip address is correct. MySQL is also running.
From a remote computer, I can successfully ping the server
ping 129.169.66.149
64 bytes from 129.169.66.149: icmp_seq=48 ttl=63 time=1.010 ms
But when I use Telnet:
TELNET 129.169.66.149
Trying 129.169.66.149...
telnet: connect to address 129.169.66.149: Operation timed out
telnet: Unable to connect to remote host
Can anyone advise? Is this a firewall issue?
(1) - https://superuser.com/questions/826896/access-wordpress-mysql-database-remotely
First try to check TCP connection issue, using netcat and telnet : on the mysql server, stop mysqld (to release port 3306) and run netcat on listen mode :
nc -l -p 3306
Now, netcat is listening port 3306 (like mysqld does when it's running) and will show what happen on that port (incoming connections, what's in the wire...).
On your remote computer (mysql client), try to connect to the mysql server host :
telnet 129.169.66.149 3306
or :
nc 129.169.66.149 3306
If this is not working, this is not a mysql server configuration issue but a network issue, and you must check your router firewall rules.
Otherwise, your problem comes from mysql server settings. Check your mysql configuration file for bind-address, and remove them to make mysqld accept clients from any IP address.
The 3306 port on the 129.169.66.149 server is closed you'll have to open this port
Use this reference as a guide http://www.cyberciti.biz/faq/linux-unix-open-ports/
I installed mysql server 5.6, and I can connect to it using mysql workbench, but I'm wondering if I can connect to it from Vagrant box, and I tried the following command, but failed:
vagrant#sdi03:~$ mysql -h 127.0.0.1 --port=3366 -u root -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
Note that I purposely run the mysql server on port 3366 instead of 3306, because I have another mysql server running on Vagrant box on port 3306.
I'm using success connect to ip adress of my windows, it's 192.168.1.55
mysql -u konst -p -h 192.168.1.55
PS I can't connect with root, i create new mysqluser konst with admin's rights
I can't access mysql through terminal on fortrabbit. I follow all steps but it is rejecting my password. However I can regullary login through ssh and edit my application. Anyone had that issue ? Thanks.
I have solved this in the past using a SSH tunnel. You open an SSH tunnel to the server, and then you connect to the MySQL server there from the endpoint of that tunnel. As such, to MySQL you appear to be connecting locally.
From the terminal:
First you need to open the tunnel, you can do it like this:
ssh -N -L8889:127.0.0.1:3306 username#your.fortrabbit.domain.com &
This opens port 8889, then opens a tunnel to your.fortrabbit.domain.com, then forwards that local port through the tunnel to the IP 127.0.0.1 and port 3306 relative to the server at your.fortrabbit.domain.com.
The options in more detail:
-N: Do not execute a remote command.
-L: Specifies the ports (local and remote).
8889: Your local port that is being forwarded.
127.0.0.1: the remote IP to which you're forwarding, relative to the server which ssh is connecting to
3306: the remote port to which you're forwarding.
username#your.fortrabbit.domain.com: Your username and domain with fortrabbit.
Now you're ready to open the connection. In the same terminal, use the following command:
mysql -h 127.0.0.1 -P 8889 -u mysql-username -p
port 8889 is now being forwarded to the port and IP of your MySQL server on the fortrabbit side, so just replace mysql-username with your username on the mysql server, and you're connected!
From a GUI:
You mentioned in your comments that you're using Ubuntu, so install MySQL Workbench from the Software Centre or here, create a New Connection and select the connection type as "Standard TCP/IP over SSH".
You will need to configure the following:
SSH Hostname: the hostname or IP of your ssh account with fortrabbit
SSH Username: your username with them
SSH Password: your password with them
SSH Keyfile: If you use keys for authentication, select the private one here.
MySQL Hostname: 127.0.0.1 (because it's local to the endpoint of your tunnel.
MySQL Server Port: normally "3306".
Username: The username for the DB
Password: The password for the DB
Default Schema: Whatever should be the default schema for this DB (can be left blank).
That should then connect from wherever you are!