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
connection | MySQL native interface database connection |
SQLConnectionOptions | Define MySQL native interface database connection options |
Functions
Topics
Configure MySQL Native Interface
- Configure MySQL Native Interface Data Source
Configure a MySQL native interface data source for a MySQL database for Windows® and macOS.
Import Data into MATLAB
- Import Data from MySQL Database Table
Import data from one table by using various functions. - Customize Options for Importing Data from Database into MATLAB Using MySQL Native Interface
Customize import options for multiple variables when importing data from a MySQL database. - Import Large Data Using DatabaseDatastore Object and MySQL Native Interface
Create aDatabaseDatastoreobject for accessing collections of data stored in a MySQL database.
Export Data from MATLAB
- Insert Data into Database Table Using MySQL Native Interface
Perform calculations on data and insert the results into a MySQL database using thesqlwritefunction.
Execute Database Operations
- Create Table and Add Column Using MySQL Native Interface
Manage MySQL database structures using theCREATEandALTERSQL statements. - Delete Data from Database Using MySQL Native Interface
Delete data from a MySQL database using MATLAB. - Roll Back Data in Database Using MySQL Native Interface
Execute theROLLBACKSQL statement to reverse changes in a MySQL database by using theexecutefunction.
Deploy Standalone Database Application
- Deploy MySQL Native Interface Database Application with MATLAB Compiler
Write a MATLAB script that connects to a MySQL database and deploy the script as a standalone database application to other machines.