How to switch between the read-only and read-write db conenctions in Laminas using DBAL

22 views Asked by At

In Laminas, I would like to switch between the read-only and read-write db connections based on the queries that I want to execute on db.

I have a mysql-innodb-cluster running with 3 instances read-only mode and 1 instance read-write mode.

For all READ operations I would like to conenct read-only instance, other than READ operations I would like to connect read-write instance.

0

There are 0 answers