I setup a mysql DB instance with elasticbeanstalk. but Im unable to connect to the DB via mySQL commandline tool or the workbench.
troubleshooting steps so far:
ping - No response time out.
WorkBench - Timeout
Commandline - Timeout
I figured this could be a firewall issue so I changed the security groups assigned to the DB to all all traffic.
Still unable to connect. Need some advice with other troubleshooting steps or solutions for how I can connect to the DB instance.
Based on the comments, the problem was the RDS had Public IP disabled. Thus, the solution was to enable it.
Related
So I have 2 EC2s in a single VPC. One EC2 is running airflow, the other ec2 is running a wordpress db.
I've created a new Airflow job that uses the MySqlHook to connect to the wordpress db.
mysql_hook = MySqlHook(mysql_conn_id='wp')
however, when I run the above code, I get the following response:
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '{PRODHOSTURL}.us-east-1.rds.amazonaws.com' (110)")
I've tried making sure there are inbound rules that allow for 3306 port connections on the wordpress db. I've tried adding bind address rules to the .conf file for mysql. I've checked and re-checked the db rules. But nothing is working. Any ideas?
PS The airflow ec2 has many jobs, most of which connect to other dbs in this same VPC...so I don't know why MySql is acting differently. Could I use a different hook?
We found the answer. The security rules were incorrect. To troubleshoot, i went to one machine and ran the command "ping {other machine's ip address}" until I could get through, in both directions. Then re-ran the code, and it worked. Thanks!
I'm having issues connecting Domo to a MySQL database hosted with AWS RDS. Whenever I try to authenticate I get this error:
"Failed to authenticate. Verify the credentials and try again. Domo is ready, but the credentials you entered are invalid. Verify your account credentials and try again. Error setting up SQL connection. Could not create connection to database server. Attempted reconnect 3 times. Giving up."
Its not security group settings. Someone suggested on this post:
https://dojo.domo.com/t5/Data-Sources-and-Connectors/MySQL-connector-issues/td-p/15462
that I should enable SSL in AWS database but I'm not sure how to do that.
I'll assume you're using the MySQL connector, not the MySQL SSH connector.
It sounds like you need to whitelist Domo's IP addresses within your AWS RDS's security groups.
Aside from that, make sure you're populating the credentials in Domo with the right pieces of information. Hostname should be the server's public IP address.
This connector follows the same general process as described in AWS's documentation here, with the exception that steps 5 and 6 are optional since SSH is not required for this connector.
I created an Azure Database for MySQL. When I try connect to it from MySQL Workbench, it cannot connect. However if I test the connection, the test passes.
When I test the connection, the test is successful:
When I try to connect however, it can't:
On the Azure Portal, I've allowed all IP addresses on the firewall and disabled "Enfore SSL connection":
Any ideas? The connection fails in less than 5 seconds, so I don't think it's a timeout issue. Here is a list of all the timeouts on MySQL Server (on Azure):
I resolved the issue by changing the bind_address=0.0.0.0 (mariadb.cnf or mysql.cnf).
Now I can connect to it using telnet (to check the setting).
I I want to connect my GUI Workbench in SSH for my server Laravel Forge with private key but it failed. In connection ssh, it works! An idea please? (see screenshots)
Instead of setting the MySQL Hostname to localhost/127.0.0.1 try setting it to your server's IP (46.101.34.74 in your case).
I ran into the same issue, tried that out of desperation and it works. Basically setting the SSH Tunnel to connect to an IP that is itself? Not sure.
I'm using MySQL Workbench on a 64bit/Win 8.1 machine to trying to connect to an Azure MySQL service, but everytime I get the following error:
Lost connection to MySQL server at 'reading authorization packet', system error:0
I followed many tutorial found ever the internet, and I also tried to disable temporarely the firewall: most of them says that the only needed parameters are:
hostname (the one given in Azure portal/MyDB/Properties)
username (the one given in Azure portal/MyDB/Properties)
(optional) password (to store in vault)
I tried also using different connection methods (Standard TCP/IP and Local socket/pipe, as suggested here) but nothing.
Can help?
I was not able to recreate your issue. Here are the steps that I tried with a MySQL database created thru the Azure portal.
Open MySql Workbench.
Setup new connection with the following settings.
Hostname: HOSTNAME
Port: PORT
Username: USERNAME
Pasword: PASSWORD
Database: DATABASE NAME
Test Connection > Succeeded.
The settings above came from portal.azure.com > MyDatabase > All settings.
One suggestion is to contact ClearDB support. You can login to ClearDB from your database's Azure dashboard by clicking on Manage Database. From there you can go to Support and log a support incident.
I was also struggling with a similar issue, as I was not able to connect my MySQL workbench with Azure VM that's running MySQL.
I've contacted the Azure support to help me out after trying it for 3-4 hrs.
They suggested me to go into network security group of that VM, and add 3306 or whatever port that your MySQL is running on our Azure to the inbound and outbound list and add the exception as All.
It helped me to connect MySQL workbench with Azure VM with MySQL on it.