Highlighted
Outstanding Contributor.
Outstanding Contributor.
124 views

How to use ODBC with Database MySql in cloud

Hello,

I have a WPF application and I am using a local MySql database.
I don't know if it will be the best way or not, but I am using ODBC as a way to access the database.
The customer now wants to place the database in the cloud and would like to know if it is enough to reconfigure the database path in the ODBC parameterization and, if so, what parameters of the cloud I need.

Thanks
Alberto Ferraz

0 Likes
5 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: How to use ODBC with Database MySql in cloud

It´s possible anyone help me with this question?

Thanks
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: How to use ODBC with Database MySql in cloud

If you are running a .NET WPF application then you should not be using an ODBC driver as this is native technology. You should instead be using the MySQL ADO provider to access the database as this is a managed .NET technology.

If you are creating a MySQL database using RDS in AWS then once you have the database configured, you should be able to connect using the hostname or IP address shown in the AWS console for the database just like you would if the database were on a network server machine.

For details of the database configuration options, you should search sites other than this MF COBOL site.

For instance I found a quick run-thru of this process at this link:

Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: How to use ODBC with Database MySql in cloud

i can Show you how to connect to a mysql Server, but had never the possibility to use this in the cloud. But the way must be the same, you use a externally ip-address (and port), then you must have a user Name and Password.
i use a connectstring to Access any database as mssql, sqllite, db2, Oracle, mysql, etc...
The are any possibilities to configure odbc
1. dsn
[Oracle-Server]
Connectstring=DSN=username;Pwd=password;
2. odbc-driver
ConnectString=Driver=Oracle in OraClient 11g_home1;Server=xxx.xxx.xxx.xxx:1234;Uid=username;Pwd=password;
for more Information send a private mail!
0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Re: How to use ODBC with Database MySql in cloud

another connectstring using the port can be as this:
[Oracle-Server]
Connectstring=Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST=xxx.xxx.xxx.xxx)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=servicename)));Uid=username;Pwd=password;
0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: How to use ODBC with Database MySql in cloud

The following information may also come in handy when connecting your WPF application to Azure Database for MySQL:

https://docs.microsoft.com/en-us/azure/mysql/connect-csharp

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.