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?
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.
Got the same issue. Looks like
innodb_read_only=1
prevents the replication. If you only setread_only=1
the replication is working fine.The setting you are looking for is read_only, not innodb_read_only. The latter isn't for the use case you are describing, it is intended for data recovery operations.