Add credentials
- Create a new pipeline or open an existing pipeline.
 - Expand the left side of your screen to view the file browser.
 - Scroll down and click on a file named 
io_config.yaml. - Enter the following keys and values under the key named 
default(you can have multiple profiles, add it under whichever is relevant to you) 
Standard connection
SSH tunnel connection
Only in Mage Pro.Try our fully managed solution to access this advanced feature.
MYSQL_SSH_HOST: Hostname or IP of the SSH bastion.MYSQL_SSH_PORT: SSH port (default 22).MYSQL_SSH_USERNAME: SSH user to log in as.MYSQL_SSH_PKEY: Path to private key file (preferred).MYSQL_SSH_PASSWORD: Password for SSH user (alternative to key).
MYSQL_SSH_PKEY or MYSQL_SSH_PASSWORD, not both.
Using SQL block
- Create a new pipeline or open an existing pipeline.
 - Add a data loader, transformer, or data exporter block.
 - Select 
SQL. - Under the 
Data provider/Connectiondropdown, selectMysql. - Under the 
Profiledropdown, selectdefault(or the profile you added credentials underneath). - Enter the optional table name of the table to write to.
 - Under the 
Write policydropdown, selectReplaceorAppend(please see SQL blocks guide for more information on write policies). - Enter in this test query: 
SELECT 1. - Run the block.
 
Using Python block
Using MySQL connector
Using Mage’s MySQL python blocks
- Create a Data Loader block from the MySQL Template
 
- Create a Data Exporter block from the MySQL Template
 
- Custom types
 
overwrite_types dict in data exporter config
Here is an example code snippet: