Set up a native connection from Matlab to MySQL with SSL
I’m trying to use the native mysql interface to connect to a MySql 8.0.37 database on Azure. This database was previously deployed to a test server which didn’t require SSL and I was able to connect to it without issue. I’m also able to connect to the new Azure MySql database using DBeaver and the MySql Workbench from the same client computer, but I get the following error when I try to connect with Matlab’s mysql connector:
Error using mysql (line 49)
Connections using insecure transport are prohibited while –require_secure_transport=ON..
My connection code is as follows (where aosDbSettings is a struct containing the connection details):
conn = mysql( …
aosDbSettings.UserName, aosDbSettings.UserPassword, …
‘Server’, aosDbSettings.Server, …
‘DatabaseName’, aosDbSettings.DatabaseName, …
‘PortNumber’, aosDbSettings.PortNumber …
);
Having reviewed the documentation for the Native MySql Interface (specifically the mysql function), I don’t see any options related to SSL. Are there any undocumented options available to make this work? I find it surprising that there’s no mention of security options in the documentation. Am I missing something?I’m trying to use the native mysql interface to connect to a MySql 8.0.37 database on Azure. This database was previously deployed to a test server which didn’t require SSL and I was able to connect to it without issue. I’m also able to connect to the new Azure MySql database using DBeaver and the MySql Workbench from the same client computer, but I get the following error when I try to connect with Matlab’s mysql connector:
Error using mysql (line 49)
Connections using insecure transport are prohibited while –require_secure_transport=ON..
My connection code is as follows (where aosDbSettings is a struct containing the connection details):
conn = mysql( …
aosDbSettings.UserName, aosDbSettings.UserPassword, …
‘Server’, aosDbSettings.Server, …
‘DatabaseName’, aosDbSettings.DatabaseName, …
‘PortNumber’, aosDbSettings.PortNumber …
);
Having reviewed the documentation for the Native MySql Interface (specifically the mysql function), I don’t see any options related to SSL. Are there any undocumented options available to make this work? I find it surprising that there’s no mention of security options in the documentation. Am I missing something? I’m trying to use the native mysql interface to connect to a MySql 8.0.37 database on Azure. This database was previously deployed to a test server which didn’t require SSL and I was able to connect to it without issue. I’m also able to connect to the new Azure MySql database using DBeaver and the MySql Workbench from the same client computer, but I get the following error when I try to connect with Matlab’s mysql connector:
Error using mysql (line 49)
Connections using insecure transport are prohibited while –require_secure_transport=ON..
My connection code is as follows (where aosDbSettings is a struct containing the connection details):
conn = mysql( …
aosDbSettings.UserName, aosDbSettings.UserPassword, …
‘Server’, aosDbSettings.Server, …
‘DatabaseName’, aosDbSettings.DatabaseName, …
‘PortNumber’, aosDbSettings.PortNumber …
);
Having reviewed the documentation for the Native MySql Interface (specifically the mysql function), I don’t see any options related to SSL. Are there any undocumented options available to make this work? I find it surprising that there’s no mention of security options in the documentation. Am I missing something? mysql, ssl, database toolbox MATLAB Answers — New Questions