Rank: 1869 based on 67 downloads (last 30 days) and 1 file submitted
photo

Robert Almgren

E-mail
Company/University
University of Toronto

Personal Profile:

 

Watch this Author's files

 

Files Posted by Robert Almgren
Updated   File Tags Downloads
(last 30 days)
Comments Rating
10 Oct 2005 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren data import, data export, mysql, database, connector, connect 67 53
  • 4.67857
4.7 | 32 ratings
Comments and Ratings on Robert Almgren's Files View all
Updated File Comment by Comments Rating
13 Oct 2014 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren Aistis Raudys

for win64:
download mysql-connector-c-6.1.5-winx64.zip or newer
unpac in the same directory
init mex if you need using: mex -setup
compile:
mex -Imysql-connector-c-6.1.5-winx64\include\ ...
-Lmysql-connector-c-6.1.5-winx64\lib\vs11\ ...
-Lmysql-connector-c-6.1.5-winx64\lib\ ...
-llibmysql -O mysql.cpp
copy libmysql.dll in the same dir as your compiled mysql.mexw64
this works about 20% faster than jdbc version

08 Aug 2014 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren Marc

Hello, is anybody has a compiled version of it running for windows 7 (64bit) with Matlab R14SP1 that I could download ? Thanks
Marc

05 Jul 2014 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren jamie mazer

After going through all comments below, here's are some streamlined instrutions for installing under OSX Mavericks (R2014a).

Step 1 - Install a mysql distribution to get the mysql client libs and headers:

% sudo bash <(curl -Ls http://git.io/eUx7rg)

As of today, this install mysql-5.6.19 -- note the version number -- you need to make sure it matches the command below. You can verify the version installed by looking in /usr/local for mysql-VERSION-osx...

Step 2 - Compile mysql.cpp:

% /Applications/MATLAB_R2014a.app/bin/mex -I/usr/local/mysql-5.6.19-osx10.7-x86_64/include/ -L/usr/local/mysql-5.6.19-osx10.7-x86_64/lib/ -lmysqlclient mysql.cpp

This will generated mysql.mexmaci64. Put it and mysql.m somewhere on your matlab path.

Step 3 - Tell OSX where to find the mysql dynamic libraries by adding:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql-5.6.19-osx10.7-x86_64/lib/

to your .bashrc/.bash_profile (or matlab startup script).

Two things that aren't clear in the comments below are (1) mysql version number (currently 5.6.19) can change, so you need to check and (2) the DYLD_LIBRARY_PATH needs to be set to USE the mex file, not to compile it.

19 Jun 2014 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren Kaare

I am getting similar problems to what Hariprasad reports, on win 7. It would be really nice if someone could help sort this out, as the function itself is very useful.

31 Mar 2014 MySQL Database Connector Connect to MySQL database. Author: Robert Almgren Felipe

Sorry to write too much... I found the error. I was compiling with Xcode 5.1... By compiling with Xcode 5.0.2 it worked. Before I also tried with queryMySQL but to retrieve the data was too slow. This is much complicate to install but at the end works so much faster than queryMySQL.

Contact us