File Exchange

image thumbnail

mysql

version 1.0 (1.43 KB) by

very simple mysql class file for working with mysql databases.

2 Downloads

Updated

View License

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.

Comments and Ratings (2)

Jozef

Jozef (view profile)

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

J. Hu

J. Hu (view profile)

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.

MATLAB Release
MATLAB 7.7 (R2008b)
Tags Add Tags
Acknowledgements

Inspired: Database project of Attendence system

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video