.: Click here to download :.
MySQL is an open-source database server designed for robustness and speed. On the MySQL home page you can read all about it. To interface to the server, you need a client program which implements the specific MySQL protocol. Then you can execute queries using standard Structured Query Language (SQL). For mathematical and statistical analysis, the best way to use the data is to download it directly into Matlab (for example using Robert Almgren's interface available at http://mmf.utoronto.ca/resrchres/mysql/ ).
Unfortunately many web servers do not allow users to access MySQL server from remote applications for safety reasons. In this case this limitation can be solved interfacing MySQL server with a php script called by Matlab application.
The php script executes the list of MySQL commands given by Matlab, and eventually returns also some output values (in case of SELECT command). This php script has to be available at the remote server (uploaded via FTP protocol). This php script receives the list of MySQL commands submitted by Matlab using POST method. Matlab in fact can read the content of an URL passing information to the server as part of the request with GET or POST methods using urlread command.
Index Terms: Matlab, source, code, php, MySQL, interface, interfacing, database, SQL, connection, server, http, request, script.
Figure 1. MySQL
A simple and effective source code for interfacing Matlab with MySQL server.
Download now free source code. This software is completely free.
This software is completely free.
The authors have no relationship or partnership
with The Mathworks. All the code provided is written in Matlab
language (M-files and/or M-functions), with no dll or other
protected parts of code (P-files or executables). The code was
developed with Matlab 14 SP1.
The code provided has to be considered "as is" and it is without any kind of warranty. The
authors deny any kind of warranty concerning the code as well
as any kind of responsibility for problems and damages which may
be caused by the use of the code itself including all parts of
the source code.