AWS Database Migration Services endpoint errors - mysql

I'm trying to setup a source MSSQL endpoint and a target MYSQL endpoint, each exist in the same vpc as the replication instance setup but I receive
Operation:testEndpointDetails:[errType=ERROR_RESPONSE, status=122502, errMessage=Failed to connect [122502] ODBC general error., errDetails= RetCode: SQL_ERROR SqlState: HY000 NativeError: 15 Message: [unixODBC][Simba][SqlServerODBC] (15) Failed to connect to the SQL Server instance: [HY000]: Connection broken [122502] ODBC general error.]
for the MSSQL source test.
and
Operation:testEndpointDetails:[errType=ERROR_RESPONSE, status=122502, errMessage=Cannot connect to ODBC provider [122502] ODBC general error., errDetails= RetCode: SQL_ERROR SqlState: HY000 NativeError: 2003 Message: [unixODBC][MySQL][ODBC 5.3(w) Driver]Can't connect to MySQL server on 'mysql_endpoint' (110) [122502] ODBC general error.]
for the MYSQL target test.
I've reentered in the credentials numerous times setting the server name for both the source and target to the subsequent RDS endpoints of each instance as well as their corresponding login credentials, ports etc.

The first thing to check is your security groups to ensure that both systems can talk to each other. It's not enough for them to reside in the same VPC. If you have ec2 instances that use the source, you could possibly use this as the security group.

The above suggestion from John Paul Hayes was correct, security group on both RDS instances was changed from a custom one setup to the default AWS one.

Related

AWS DMS not able to connect Mysql source DB but DB is connecting from mysql command

I am working on a project, where I want to replicate data from a source Aurora Mysql to Kinesis with AWS data migration service (DMS).
I am able to connect to source Mysql DB from mysql command and can see whole database:
mysql --host=<host>.amazonaws.com --port=8200 --user=<user> -p
But when I am starting replication task of DMS, DMS is giving connection issue with source DB. Connection with destination (Kinesis) is fine.
Testing connection for source DB from DMS, giving error:
Test Endpoint failed: Application-Status: 1020912, Application-Message: Cannot connect to ODBC provider ODBC general error., Application-Detailed-Message: RetCode: SQL_ERROR SqlState: HY000 NativeError: 2003 Message: [unixODBC][MySQL][ODBC 8.0(w) Driver]Can't connect to MySQL server on '.compute-1.amazonaws.com' (110)
I tried from AWS docs but I am not able to figure out the issue. In the network ACL of VPC, I have allowed ALL incoming traffic for its VPC.
Faced the same issue, not sure if you have figured out the solution. Network setup was fine, was using the same VPC for both RDS and DMS Replication instance, there was no issue with security group, however the issue was with the version of DMS.
RDS MySQL version is 5.7, the ODBC driver present in the higher version doesn't seem to work with the RDS instance or probably something is limiting connection to RDS MySQL 5.7 in DMS, launched a new replication instance in DMS with version 3.3.3 and the DB connectivity worked fine, also data movement is happening fine

Unable to connect to GCP cloud SQL private instance

We have create private cloud instance but I am unable to connect to it using MYSQL workbench, php or a ODBC client.
From the same compute instance I can connect using mysql -h IP -u user -p *****. With GCP services I usually find gotcha in some document and I have tried digging everything possible. Here below error from a ODBC client:
BIP2393E: Database error: ODBC return code '-1' from data source ''DEVA'' using ODBC driver manager ''/opt/iib-10.0.0.20/ie02/lib/libodbcinterface.so''.
The integration node received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database.
BIP2322E: Database error: SQL State ''HY000''; Native Error Code '2003'; Error Text ''[unixODBC][MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on '1x.1x.1x.1x' (110)''.
The error has the following diagnostic information: SQL State ''HY000'' SQL Native Error Code '2003' SQL Error Text ''[unixODBC][MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server on 'x.x.x.x' (110)''
This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database.
If I try and use a local proxy I get below:
BIP8299I: User 'user' from security resource name 'BIGDEVA' will be used for the connection to datasource 'DEVA'.
BIP8290I: Verification passed for the ODBC environment.
2020/07/16 20:29:41 New connection for "sql-instance"
2020/07/16 20:31:49 couldn't connect to "sql-instance": dial tcp x.x.x.x:3307: connect: connection timed out
BIP2393E: Database error: ODBC return code '-1' from data source ''DEVA'' using ODBC driver manager ''/opt/iib-10.0.0.20/ie02/lib/libodbcinterface.so''.
The integration node received an error when processing a database operation. The ODBC return code was '-1'. See the following messages for information obtained from the database about this error.
Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database.
BIP2322E: Database error: SQL State ''08S01''; Native Error Code '2013'; Error Text ''[unixODBC][MySQL][ODBC 5.3(a) Driver]Lost connection to MySQL server at 'reading initial communication packet', system error: 0''.
The error has the following diagnostic information: SQL State ''08S01'' SQL Native Error Code '2013' SQL Error Text ''[unixODBC][MySQL][ODBC 5.3(a) Driver]Lost connection to MySQL server at 'reading initial communication packet', system error: 0''
This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database.
Private cloud instance I meant that the network it sits in has no internet access, I guess it was not needed. Subnet A holds the client VM and Subnet B holds the DB instance and they have SA account based firewall rules. Though we found the issue as the firewall was open on service accounts on the VM so using a mysql client was working but apparently GKE POD subnet need it's own firewall rules and it doesn't inherit VM SA account/tag rules whereas a standalone docker container on it's own does.

Cannot connect to AWS RDS instance that is not in VPC

In our company we use few AWS RDS MySQL instances while few of those aren't in any VPC (we have created those 3 years ago).
I need to connect to such an instance using Microsoft SQL Server Management Studio but when I'm trying to do so I'm getting following error after few seconds:
TITLE: Connect to Server
Cannot connect to host_path.amazonaws.com.
------------------------------ ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
(Microsoft SQL Server, Error: 53)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476
The network path was not found
If I add the port after the host path like described there
I'm getting different error:
TITLE: Connect to Server
Cannot connect to host_path.amazonaws.com,3306.
------------------------------ ADDITIONAL INFORMATION:
Internal connection fatal error. Error state: 18 (System.Data)
The thing is that the link above they are talking about DB instance that is within VPC but our isn't.
Did anyone of you stuck with similar issue earlier and maybe know how to resolve that or at least can point me out to the correct way?
I've Googled a lot regarding this issue but every forum or FAQ says about DB instance within VPC which isn't my case.
In screenshot below
you can see the connection window within the program, all sensitive data has been painted over.
Thank you in advance.
Pretty sure you cant directly connect from SSMS to a MySQL database. I think you can setup a "Linked Server" (basically an ODBC driver/datasource, then connect to your localhost, which in turn talks to MySQL).
See: https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-2017
I'm assuming your requirement for SSMS is that you plan to reference data from both SQL Server and MySQL? If so, it should work, but its performance wont be great.

“The server was not found or was not accessible” Error for SQL Server 2008

Error message is like this:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 51 - An instance name was not specified while connecting to a Local Database Runtime. Specify an instance name in the format (localdb)\instance_name.)
And my scenario: IIS and SQL Server 2008 are on the same test workstation, whose firewall is not enabled at all. I don't see any SQL Server log so I can't find any other useful information than the error message above.
I installed SQL Server as default instance (MSSQLSERVER)
My connection string is like this (I am using SQL Server account for authentication):
Server=(localdb); Database=MY_DB_NAME; User ID=MY_USER_ID; Password=MY_PASSWORD
I already verified this user has access to the target database (as owner)
I have gone through some articles on how to track down this problem: I set "allow remote connection" even though IIS and SQL Server are on the same machine. I don't need to set-up firewall.
If you have a standard, unnamed instance, you should use . or (local) (but not (localdb) !) as your server name
Try to use this connection string:
Server=(local); Database=MY_DB_NAME; User ID=MY_USER_ID; Password=MY_PASSWORD

SQL Server Express - Remote Connection continues to fail

I have been unable to configure my SQL Server 2008 Express to allow remote connections. I followed the instructions from this guide: http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/ .
I am still getting the following error:
Cannot connect to 00.00.00.000
Additional information:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.
(Provider: Named Pipes Provider, error 40 - Could not open a connection to SQL Server) ( Microsoft SQL Server, Error: 3)
I also configured the firewall as defined in http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/ . As a test I even turned off the firewall, but nothing changed, so it is not the issue.
Update under server name, it only says the IP address. Do I need something more?
In the Server name field of Connect to Server, I had myipaddress. I changed it to myipaddress\SQLEXPRESS and it works.
In addition, once this was working without the firewall I applied settings as defined in http://www.sevenforums.com/system-security/58817-remote-access-sql-server-express-2008-windows-7-a.html to make the connection work with the firewall turned on.
Do you have sysadmin rights in sql express? It may be that your user account doesn't have the necessary permissions. There is a script on codeplex that will add you logged on account as a sysadmin.