The component will lookup connection data in secdist.json via its name.
Secdist format:
Connection settings are described as a JSON object mysql_settings, containing descriptions of MySQL/MariaDB clusters.
'mysql_settings': {
'sample-sql-component': {
# First host is considered a primary, all others - secondaries.
# This behavior is hard-coded and the mysql driver doesn't perform
# automatic primary [re]discovery.
'hosts': ['localhost'],
'port': 13307,
'password': '',
'user': 'root',
'database': 'sample_db',
},
},
Important note: the uMySQL driver does NOT perform an automatic primary detection and always considers the first host in hosts list an only primary node in the cluster.