![Angry developer](https://blog.hostname.sk/wp-content/uploads/2014/04/2014-04-30_125928_IMG_5765_crop-150x150.jpg)
Angry developer
1465 HY000 ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA Triggers can not be created on system tables
Facepalm. I don’t know about this limitation before. But somebody maybe finds this procedures usefull for replicating other tables/schemas. It is released as Open Source and repository is available on github.
Installation is simple:
git clone https://github.com/lhost/mysql-replicate-by-triggers cd mysql-replicate-by-triggers make install
This will create procedures in `repl` schema. Then you can create triggers with the following command:
echo 'CALL repl_init("srcdb", "dstdb")' | mysql "repl" | mysql "repl"
It is workaround for another limitation: you can’t create trigger in procedure.