johnsca / juju-relation-mysql

Other
2 stars 5 forks source link

Charm-specified database name #2

Open AdamIsrael opened 8 years ago

AdamIsrael commented 8 years ago

Pre-layers, we could use relation_set in the db-relation-joined script to tell mysql the name of the database we'd like to use. This is particularly handy when installing software that's expecting a specific database name and changing that behavior is cumbersome.

It'd be good to have a way to communicate this in the db.joined state, to override the default of setting the database name equal to the service name.

johnsca commented 8 years ago

I'm fairly certain you actually have to use a different interface (mysql-shared) to do that with MySQL.

In contrast, the Postrgres charm does support changing the database name on the same relation, see interface:pgsql requires.py#L47