MySQL Native Interface - MATLAB & Simulink (original ) (raw )Main Content
Interact with a MySQL® database using the MySQL native interface
Create a data source and connect to a MySQL database. Explore data and import data from the database into MATLAB®. Export data from MATLAB into the database. Explore and import data using the Database Explorer app or the command line.
Objects
connection
MySQL native interface database connection (Since R2020b)
SQLConnectionOptions
Define MySQL native interface database connection options (Since R2020b)
Functionsexpand all
MySQL Native Interface Configuration
databaseConnectionOptions
Create database connection options (Since R2020b)
rmoptions
Remove MySQL native interface connection options (Since R2020b)
saveAsDataSource
Save MySQL native interface data source (Since R2020b)
setoptions
Set MySQL native interface connection options (Since R2020b)
reset
Reset MySQL native interface connection options to defaults (Since R2020b)
testConnection
Test MySQL native interface database connection (Since R2020b)
MySQL Native Interface Connection
mysql
Create MySQL native interface database connection (Since R2020b)
close
Close MySQL native interface database connection (Since R2020b)
isopen
Determine if MySQL native interface database connection is open (Since R2020b)
sqlfind
Find information about all table types in MySQL database (Since R2020b)
Import Data into MATLAB
fetch
Import results of SQL statement in MySQL database into MATLAB (Since R2020b)
sqlread
Import data into MATLAB from MySQL database table (Since R2020b)
sqlinnerjoin
Inner join between two MySQL database tables (Since R2020b)
sqlouterjoin
Outer join between two MySQL database tables (Since R2020b)
executeSQLScript
Execute SQL script on MySQL database (Since R2020b)
Customize Options for Data Import from Database
databaseImportOptions
Define import options for database data
getoptions
Retrieve import options for database data
preview
Preview eight rows from database using import options
setoptions
Customize import options for database data
reset
Reset to default import options for database data
Import Large Data into MATLAB Export Data from MATLAB
sqlwrite
Insert MATLAB data into MySQL database table (Since R2020b)
Database Operations
execute
Execute SQL statement using MySQL native interface database connection (Since R2020b)
commit
Make changes to MySQL database permanent (Since R2020b)
rollback
Undo changes to MySQL database (Since R2020b)
sqlupdate
Update rows in MySQL database table (Since R2023a)
Topics Import Data into MATLAB
Execute Database Operations