I just heard about amazon rds and MySQL Workbench today from my partner for my group project, so I'm not very familiar with them. My partner has created a host account on amazon rds for our database, and I am suppose to help create table and make sql queries. However, I'm having no luck connecting to the database through MySQL workbench. The error message I received is "Unknown MySQL server host '*host_address*'. I have tried adding port 3306 to my firewall as suggested by a blogger, but that still doesn't work. There are some answers that say in order to connect to amazon rds, the user would need to add his/her IP address to the "DB Security Group" in amazon rds. So, does that mean my partner would need to add MY IP address to "DB Security Group" in the amazon rds account that my partner had created for the database? I been working on getting the connection for the last 6 hours, so I'm very greatful if someone could answer my question or point me in the right direction. Thank you for all your help.
The RDS Security Group for your RDS instance needs to be configured to allow access from your IP address. Once it is done, then you can verify that you have GOOD connectivity by running telnet <you_RDS_Instance_Name> 3306. Once you are able to connect fine, then I should be able to connect using MySQLWorkbecnh.
I have personally never used MySQL Workbench but I connect using MySQL cli to my RDS instance.
Here is the sample telnet command:
# telnet myrds.us-west-2.rds.amazonaws.com 3306
Trying 10.249.88.207...
Connected to myrds.us-west-2.rds.amazonaws.com.
Escape character is '^]'.
N
5.6.13-log▒)BM#5)n▒\eeM/B?Vr[P_mysql_native_password^]
telnet> q
Connection closed.
Read More about RDS Security Groups here.
This blog posting (http://thoughtsandideas.wordpress.com/2012/05/17/monitoring-and-managing-amazon-rds-databases-using-mysql-workbench/) describes how to use MySQL Workbench with Amazon RDS. It's for an older version of MySQL Workbench but still valid.
Related
I have a flyway script that I run to migrate my db to Azure SQL db. Looks something like this:
flyway.url=jdbc:sqlserver://myazuresqlserver.database.windows.net/myazuresqldatabase;ssl=request;integratedSecurity=false;
flyway.user=myazuresqluser
flyway.password=myazuresqlpassword
...
And when I run it I get the following error:
Unable to obtain connection from database (jdbc:sqlserver://myazuresqlserver.database.windows.net/myazuresqldatabase;ssl=request;integratedSecurity=false;) for user 'myazuresqluser': The TCP/IP connection to the host dbserver-appinfra-test-000.database.windows.net/sqldb-appinfra-smartsuitemainoperational, port 1433 has failed. Error: "myazuresqlserver.database.windows.net/myazuresqldatabase. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
So the thing is I already have one db that I migrated to another Azure SQL db. The script file for that one was almost idetical to the one I am using to migrate this database. I saw posts similar to mine, and, as you can see, I tried adding stuff like "ssl=request" to the connection string, which didn't work, and also setting setting the minimum required TLS version of the azure sql db to the lowest one.
So, because I followed the exact same steps for the other database and it the migration to Azure worked there, I looked closely into the connection strings of my azure databases. Both of the databases are on the same azure SQL server that I created, and both of them are in the same elastic pool that I created.
From my understanding the problem is that, looking at the connection strings, both of the database have this in their connection strings:
myazuresqlserver:1433
Also, important to mention - I did try to connect to this database from Azure Data Studio and SSMS. And it connects just fine
So I think they are both on the same port of the same server, that is the problem.
Could someone let me know how I could change the port of my Azure SQL database to something else in Azure? Or if it is unrelated please let me know what I can do. Help much appreciated!
The problem was in the line flyway.url=jdbc:sqlserver://myazuresqlserver.database.windows.net/myazuresqldatabase
This is what I had in my other flyway migration file (which worked perfectly) so I thought there shouldn't be any problem with this line. But I had to change it to
flyway.url=jdbc:sqlserver://myazuresqlserver.database.windows.net;database=myazuresqldatabase;
Hope this will help someone!
I have a database (MySql) on digital ocean for my application.
I would like to connect to the database via MySql Workbench. However, I struggle to understand how to do that.
I know I need to use an SSH connection, so on MySQLWorkbench I select the method 'standard TCP/IP over SSH'.
At this point though, I don't understand which are my SSH parameters.
On the DO database dashboard, I can select connection parameters, but none of them are excplicitly SSH parameters.
So I would appreciate some help to understand how to connect my DO database to MySql workbench.
I was happily using mysql command line in my mac to connect Azure Database for MySql. But all of sudden it started throwing an error saying:
ERROR 2003 (HY000): Can't connect to MySQL server on 'XXXXXXXX.mysql.database.azure.com' (61)
I can see the the database instances is running alright, as I'm able to use the database from an application that is running in Azure.
Has anyone else experienced this?
This problem occurred because the particular network i was connected to not allowing any such connections. Later when i tried from my usual network ( home / office )it got connected. I haven't made any changes in my Azure Db for MySql nor in my local machine, this proves that problem was with that particular network.
It sounds like firewall rules were not setup for that specific network. Can you confirm by looking at this doc?
https://learn.microsoft.com/en-us/azure/mysql/concepts-firewall-rules
Basically, you can click "Add my IP" which would add your current network's Client IP. However, if the network you are on SNAT's out with multiple IP's, you would need to add the entire range from your networking team.
Thanks.
James
Myself trying to host a web application in amazon server which takes data from database.I tried to make an instance in amazon rds with master username as root and a password.I have mysql workbench . I don't know how to import my .sql files to amazon rds.While going through the tutorial i am getting confused wih the security group and all.My questions are
1.do i need to create a security group to do my job,to accesss my application from any ip address?
2.how can i create database with this amazon server in sql workbench/sql query browser.
You can either create or add your IP address in default security group to access application to Database.
Amazon RDS is just another database maintained by Amazon for you.No much difference in usability, You can connect to it from your MYSQL workbench by providing RDS details and you can star using just as another database.
I am currently unable to connect to my Azure SQL database from a separate remote standalone dedicated box in a private datacenter.
I have an Azure SQL database where I manage the list of IP addresses that can connect to this database. This has worked perfectly until now. I have recently set-up a new dedicated box in a private datacenter that needs to query the Azure SQL database at regular 5 second intervals, give or take.
The problem is, this dedicated box cannot establish a connection to the Azure SQL database, despite being able to connect to other remote FTP servers, MySQL servers, etc. The Azure SQL database does have the IP address of the dedicated box on the allowed connection list. Furthermore, I temporarily opened up a massive range of allowed IP addresses (0.0.0.0 -> 255.255.255.255) on the Azure SQL database to see whether this inability to connect may have resulted from IP blocking.
Does anyone have any suggestions or thoughts on what might be causing this and how I could begin debugging the situation better?
To clarify: I can connect to the Azure SQL database from laptops with individual IP addresses in my office and elsewhere, so long as they have been added to the database whitelist; I can make outward connections to remote FTP and MySQL servers from the dedicated box; I have tried to open-up a massive range of allowed IP addresses on Azure SQL with no luck.
Edit
C:\Users\graphite.rack.ID17157>osql -S v7o06blktw.database.windows.net -U XXXXXXX#v7o06blktw -P XXXXXXX
[SQL Server Native Client 11.0] Named Pipes Provider: Could not open a
connection to SQL Server [53].
[SQL Server Native Client 11.0] Login timeout expired
[SQL Server Native Client 11.0] A network-related or instance-specific error
has occurred while establishing a connection to SQL Server. Server is not
found or not accessible. Check if instance name is correct and if SQL Server
is configured to allow remote connections. For more information see SQL Server
Books Online.
To summarize.
Windows Azure SQL Database (formerly known as SQL Azure) works exclusively and only on TCP port 1433. It only support SQL Server Authentication, TCP connection and TDS protocol as of today.
In order to successfully establish connection to SQL Azure one must fulfil the following requirements:
Create SQL Azure server & Database
Setup SQL Azure Server's firewall rules to accept connections from the IP address of application that will connect to that server
Make sure the box (be it Virtual, or home, or whatever) has no blocking outbound TCP port 1433
Explicitly force encryption in connection string
Explicitly chose to not trust server certificate in connection string
Please note that many (if not all) ISPs (Internet Service Providers) and Hosters, as well as IT staff within companies DO block outgoing TCP Port 1433 due to the SQL Slammer worm. This outgoing port blocking appears to be one of the most faced issues of newcommers to SQL Azure.
UPDATE Nov. 2015
As of August 2015, there is preview feature that enables you to use Azure AD to authenticate to Azure SQL Database. You can read more on this new preview feature here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/
If you're using corporate network for internet access and facing this problem,
a simple way around this is to use your phone's mobile hotspot for internet access instead.
Be sure to disable your ethernet connection too, which may also be connected to the internet.
Spent hours on this issue. The fix for me was finally found to be my setting on the Xfinity firewall. I had it set to high. Once I changed the setting to low security, I could connect to the Azure sql database with no issues.