I would recommend using java to connect MATLAB and MySQL (or any other db if required).
The java database connector is easy to configure. I built a simple java class to connect to the database - see the previous post for a rough but working solution.
MATLAB code works as directed
% include java class import Jam.ConnectToDatabase % set up database connection info userName='myName'; userPassword='myPassword'; databaseUrl='jdbc:mysql://glnd2818898.internal.net/2000'; % create java class instance and open connection to the database ctd = ConnectToDatabase; ctd.openConnection(userName, userPassword, databaseUrl)
Once the connection is open, I can use java methods to send SQL queries, create tables, insert data, etc. I had never used java before, but I downloaded Netbeans and I was gone.
source share