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

Replicate from table a to table b within the same server

Hi, normally when we talki about replication, we think of one or many slave server replicating changes from one or many master server.

However, for performance increasing reasons, I would like to be able to replicate the data from one table to another table within one server.

In particular, I want to be able to update changes from table "a" to table "b" both within say database "db". In this case, "b" will be a clone of "a".

Does MariaDB particularly support this feature, or does anyone know any possible work-around for this ?

Any help would be very appreciated ! Thanks !!!

Answer Answered by Ian Gilfillan in this comment.

I don't think replicating like this is possible, but since both reside on the same server you can use triggers to achieve the same thing.

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.