In order for Matlab to access the database, it is necessary to download a JDBC driver, which will be the bridge between Matlab and the database. The link to download the driver can be found here.
Once you’ve downloaded the folder, put the folder (it should be called something similar to “mysql-connector-java-5.1.39”) in a location you can easily reach and remember.
Open the Matlab code called GraphUsingJDBC. Now you need to establish the connection between Matlab and the database. Where it says
change the directory so that it matches where you’ve saved the JDBC driver folder. Now if you run the code, it will make the connection to the database and graph the data you desire.