Page 1 of 1

Master to Master mariadb replication

PostPosted:Tue Apr 23, 2024 6:00 am
by Mehra0019
Hi,
So I'm working on a scenario, like there are 2 machines (Ubuntu 22) both have separate Openkm instance running, now I want to sync the database and I there is any change like create user, upload doc, or anything, it should reflect back to the other machine as well also I am using syncthing for file sync.
So my question is how can I achieve this ?

Re: Master to Master mariadb replication

PostPosted:Wed Apr 24, 2024 4:31 am
by Mehra0019
annagrisham wrote: Configure database replication: Use a database replication mechanism to keep the databases of both instances synchronized. There are different methods available depending on the database server you are using. For example, if you're using MySQL, you can set up Master-Slave replication or Master-Master replication.
In this step when I am trying to write in the Db then the following error displayed on db and it is in more than 8 tables
Last_Error: Error 'Duplicate entry '269' for key 'PRIMARY'' on query. Default database: 'okmdb'. Query: '/* insert com.openkm.dao.bean.Activity */ insert into OKM_ACTIVITY (ACT_ACTION, ACT_DATE, ACT_ITEM, ACT_PARAMS, ACT_PATH, ACT_USER) values ('LOGIN', '2024-04-23 10:51:51.837', NULL, '0:0:0:0:0:0:0:1', NULL, 'okmAdmin')'

Re: Master to Master mariadb replication

PostPosted:Mon May 13, 2024 7:02 am
by jllort
¿Are you trying to configure something like a mirror?