0

I set up a couple of maraidb v10.2.10 containers with the official docker image. Master can read/write and slave is read-only with this my.cnf.

[mysqld]
server_id=2
read_only=1
innodb_read_only=1

Replication was working well for a while but it stopped with the following error:

Slave_IO_Running: Yes
Slave_SQL_Running: No
Last_Errno: 1942
Last_Error: Error during COMMIT: failed to update GTID state in mysql.gtid_slave_pos: 1036: Table 'gtid_slave_pos' is read only

I added this line into slave's my.cnf and set it up again from the beginning but still got the same error.

replicate-ignore-table=mysql.gtid_slave_pos

Does this mean that Innodb can't replicate to innodb-read-only server?

0

As well explained here slave should be read_only. Are you sure that nobody is trying to write to slave? Check if available the binlog.

  • Hi, thanks for your reply. I'm sure nobody tried to write to slave. The name of gtid_slave_pos seems to be used by slave itself to check the slave status. I believe slave itself wants to COMMIT. I thought I turned off the gtid_mode but mariadb doesn't have the variable. mariadb.com/kb/en/library/… There will be a hint in here mariadb.com/kb/en/library/gtid but I'm not an English expart, so coudln't figure out it yet. – kujiy Nov 9 '17 at 0:15
  • I added slave_skip_errors=1942 but still got the same error. I start to think this as a mariadb's bug. – kujiy Nov 9 '17 at 0:51

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.