Skip to content

MySQL Sink Configuration

A MySQL sink config defines how datagen connects and writes data to MySQL.

{
"sink_name": "pluto_mysql",
"sink_type": "mysql",
"config": {
"host": "localhost",
"database": "datagen",
"port": 3306,
"username": "dg",
"password": "dg",
"batch_size": 1,
"throttle": "10ms"
}
}
FieldTypeRequiredDescriptionDefault
hoststringYesMySQL server hostname or IP-
databasestringYesDatabase name to write into-
portnumberNoMySQL port3306
usernamestringYesDatabase user-
passwordstringYesDatabase password-
batch_sizenumberNoRecords per batch insert1
throttlestringNoDelay between batches (e.g., “10ms”, “1s”)-

Notes:

  • Ensure user has INSERT privileges on target tables
  • Use appropriate batch_size and throttle to control load rate