I'm trying to setup IS as key manager (v3.0.0) and api manager (v3.0.0) using a HA mysql (v8.0) configuration. While running the sql scripts for db creation, I'm getting errors from mysql on the entries about foreign keys with ON DELETE CASCADE, which is not supported by mysql when group replication is on. How can I create a fully HA setup if I can only duplicate IS and API manager but not mysql? Is there a workaround?
Asked
Active
Viewed 88 times
1
-
Why do you need replication? Is this a multi-datacenter setup? – Bee Mar 03 '20 at 08:29
-
a HA innodb cluster for mysql is based on group replication – kyriakos kouramenos Mar 03 '20 at 09:57
1 Answers
0
You can replace cascade operations with triggers. Here is an Oracle sample. You can do the same with MySQL.
CREATE or REPLACE TRIGGER TRG_DEL_AM_APPLICATION
BEFORE DELETE
on AM_APPLICATION
FOR EACH ROW
BEGIN
DELETE FROM AM_SUBSCRIPTION AMSU WHERE AMSU.APPLICATION_ID = :OLD.APPLICATION_ID;
DELETE FROM AM_APPLICATION_KEY_MAPPING AMKM WHERE AMKM.APPLICATION_ID = :OLD.APPLICATION_ID;
DELETE FROM AM_APPLICATION_REGISTRATION AMAR WHERE AMAR.APP_ID = :OLD.APPLICATION_ID;
DELETE FROM AM_APPLICATION_GROUP_MAPPING AMGM WHERE AMGM.APPLICATION_ID = :OLD.APPLICATION_ID;
DELETE FROM AM_APPLICATION_ATTRIBUTES AAA WHERE AAA.APPLICATION_ID = :OLD.APPLICATION_ID;
END;
Ref:
[2] https://docs.oracle.com/goldengate/1212/gg-winux/GWUAD/wu_bidirectional.htm#GWUAD287

Bee
- 12,251
- 11
- 46
- 73
-
thank you, I'm not experienced enough to proceed to something like this but I'll give it a go. – kyriakos kouramenos Mar 03 '20 at 10:59