From: Jonathan Karr on
Six years later I got the same error that reported here. The solution is to write a java class (see below) which registers the MySQL driver and creates a database connection. After that you can use the returned database connection to create statements, execute statements, and fetch result sets. See matlab central post with author 'Jonathan Karr' for full solution

//package edu.stanford.covertlab.database;

import com.mysql.jdbc.Driver;
import java.sql.Connection;
import java.sql.DriverManager;

public class MySQLLoader
{
public static Connection makeConnection(String hostName, String schema, String userName, String password)
throws Exception
{
DriverManager.registerDriver(new com.mysql.jdbc.Driver());
return DriverManager.getConnection("jdbc:mysql://"+hostName+"/"+schema, userName, password);
}
}
From: Jonathan Karr on
This file contains the full MATLAB/MySQL connector J solution: http://www.mathworks.com/matlabcentral/fileexchange/28237.