Code covered by the BSD License  

Highlights from
mysql

4.0

4.0 | 1 rating Rate this file 20 Downloads (last 30 days) File Size: 1.43 KB File ID: #24703

mysql

by

 

very simple mysql class file for working with mysql databases.

| Watch this File

File Information
Description

In m file just change line
obj.dbconn = database('name', 'user', 'password');
using your own data.

In main program just do connection = mysql.

Result = connection.execute('statement') executes any mysql statement and obtains data, if any, in variable result.

connection.tableExists('tableName') is true/false based on existence of the tableName in Mysql database.

Required Products Database Toolbox
MATLAB release MATLAB 7.7 (R2008b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
06 Jan 2011 Jozef

You need to check, whether your mySQL server is up and running well
first outside MATLAB.
second you need to do this:

inside my file change 'name', 'user' and 'password'.

and then just conn = database; and then conn.execute('sql statement');

Jozef

05 Jan 2011 J. Hu

I change obj.dbconn = database('name', 'user', 'password') using my own data; and then do

connection = mysql

but I got following message:

??? Error using ==> mysql>mysql.mysql at 15
Not possible to connect to MYSQL

Can you tell me what is wrong? Sorry I am new to connection to mySQL using matlab.

Contact us