If you look at the 'Help' tab for the node it says this:
mysql
Allows basic access to a MySQL database.
This node uses the query operation against the configured database. This does allow both INSERTS and DELETES. By its very nature it allows SQL injection... so be careful out there...
msg.topic must hold the query for the database, and the result is returned in msg.payload .
msg.payload can contain an array of values to bind to the topic.
Typically the returned payload will be an array of the result rows. Note : these are of type RowDataPacket , and not a completely standard object.
If nothing is found for the key then null is returned,
The reconnect timeout in milliseconds can be changed by adding a line in settings.js
Since it doesn't say you can dynamically change them, then you can't.
add multiple nodes and configs - each set for a different database & route messages from dashboard appropriately
NOTE: environment variables are only read when node-red starts. To set them via dashboard you would need some way of setting the OS env variables (where node-red runs) and restarting node-red - not simple but possible.