Model persistence - Giving write permissions to replica

In our current set-up, we have a master MySQL database and a read-only replica database. The metabase application DB runs on the master DB, however, Metabase connects to our replica, as we don't want the slow BI queries to run on our production DB.

We want to turn on model persistence, as some of our tables are way too big to still query efficiently on. We created the caching schema, and the metabase user (that connects to the metabase application DB) has the correct permissions, however, we always get the following error:

"Lack permission to create table in schema metabase_cache_8b4aa_2"

Has anyone encountered the same issue or can anyone help me in the right direction?

Thanks!

Are you sure the metabase user has Create Table Permissions? Can you share the permissions for this user?

@TonyC We've just figured out that it's due to our replication setup which sets the global variable "read_only" to true. Turning it off seems like a violation of the read-only replica. Is there any way to make it write to the metabase application db instead, like the caching is doing?

1 Like