Borrar filtros
Borrar filtros

MySQL ODBC Connection using SSL

4 visualizaciones (últimos 30 días)
Afzal Ali
Afzal Ali el 3 de Feb. de 2018
Respondida: HimeshNayak el 16 de Mzo. de 2023
What would be the ODBC equivalent of the following:
hconn = database('{schema name}','{username},'{password}',...
'com.mysql.jdbc.Driver',...
'jdbc:mysql://testazureserver.mysql.database.azure.com:3306/{schema name}?...
useSSL=true&requireSSL=false&autoReconnect=true&');

Respuestas (1)

HimeshNayak
HimeshNayak el 16 de Mzo. de 2023
Hi Afzal
As per my understanding you want to convert our JDBC code to ODBC. Here is the code you are looking for:
conn = odbc("Driver={MySQL ODBC 8.0 ANSI Driver};" + ...
"Server=testazureserver.mysql.database.azure.com;" + ...
"Port=3306;" + ...
"Database={schema name};" + ...
"Uid={username};" + ...
"Pwd={password};" + ...
"sslmode=REQUIRED;");
You would also have to install the “MySQL ODBC driver” on your system and replace {schema name}, {username}, and {password} with your own values. You may also need to adjust the “Driver name” and “SSL parameters” based on your configuration.
For more information about “odbc”, refer to the following link:
Regards
HimeshNayak

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by