This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-17. For the latest, interactive version please visit https://mariadb.com/kb/.

Can MaxScale filter based on database name?

Dear MariaDB team,

let's say we have 3 different mysql clusters and some databases are on cluster 1, others are on cluster 2 and so on. Example

cluster1: db_a, db_b
cluster2: db_c, db_d, db_e
cluster3: db_f

Can MaxScale filter and route based on database name? For example if connection is being established to db_c the MaxScale would connect it to cluster2. Another connection to db_f would connet it to cluster3 and so on...

Is it possible to do that?

Answer Answered by Markus Mäkelä in this comment.

Take a look at the schemarouter module, it should allow you to automatically work with a sharded set of databases: https://mariadb.com/kb/en/mariadb-maxscale-24-schemarouter/

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.