Overview
Use MySQL as a destination in Mage to write pipeline data into structured tables within a MySQL database. This integration supports both direct connections and SSH tunneling for secure access to remote or private databases. Each record from the Mage pipeline is inserted as a row in the configured table. Mage supports optional connection customization and SSL settings through connection keyword arguments.Configuration Parameters
You must provide the following parameters when configuring the MySQL destination:Optional Configs
Notes
- For cloud-hosted MySQL (e.g., Amazon RDS, Azure Database for MySQL), ensure proper firewall rules and access control.
- Use
ssh_tunnelmode when connecting to databases hosted in private networks or VPCs. - The
conn_kwargsparameter is useful for enabling SSL/TLS and advanced options (e.g.,ssl_ca,ssl_cert,connect_timeout). - Mage automatically creates the destination table unless
skip_schema_creationis set totrue.