To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
How can I connect matlab to mysql using ODBC?
As Sven suggests, you should use the functions within the Database Toolbox - assuming of course that you have this toolbox. The help documents are very good and have some examples that should get you going. Please upload your code if you are still struggling.