주요 콘텐츠

MySQL Native Interface

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

connectionMySQL native interface database connection
SQLConnectionOptionsDefine MySQL native interface database connection options

Functions

expand all

databaseConnectionOptionsCreate database connection options
rmoptionsRemove MySQL native interface connection options
saveAsDataSourceSave MySQL native interface data source
setoptionsSet MySQL native interface connection options
resetReset MySQL native interface connection options to defaults
testConnectionTest MySQL native interface database connection
mysqlCreate MySQL native interface database connection
closeClose database connection
isopenDetermine if database connection is open
sqlfindRetrieve metadata about database objects
fetchImport data from execution of SQL statement
sqlreadImport table data from database
sqlinnerjoinPerform inner join on two database tables
sqlouterjoinPerform outer join on two database tables
executeSQLScriptExecute SQL script on MySQL database
databaseImportOptionsDefine import options for database data
getoptionsRetrieve import options for database data
previewPreview eight rows from database using import options
setoptionsCustomize import options for database data
resetReset to default import options for database data
databaseDatastoreCreate datastore for data in database
hasdataDetermine if data in DatabaseDatastore is available to read
previewReturn subset of data from DatabaseDatastore
readRead data in DatabaseDatastore
readallRead all data in DatabaseDatastore
resetReset DatabaseDatastore to initial state
splitsqlquerySplit SQL query using paging
createConnectionForPoolInitialize parallel pool using database connection
sqlwriteInsert MATLAB data into database table
commitMake changes to database permanent
executeExecute SQL statement on database
rollbackRevert changes made to database
sqlupdateUpdate rows in database table (Since R2023a)

Topics

Configure MySQL Native Interface

Import Data into MATLAB

Export Data from MATLAB

Execute Database Operations

Deploy Standalone Database Application