Related tickets I've looked at: 1, 2, 3
My problem with the solutions presented is that they're asking the dumpfile to be changed, which is not possible in this case.
The slave thread is being blocked by this error:
Error 'Cannot create a JSON value from a string with CHARACTER SET 'binary'.' on query. Default database: 'db'. Query: 'UPDATE ....
My replica Aurora MySQL is reading the binlog replication file as binary and cannot produce a json from it. One of the things I noted is this part in the json object
_utf8mb4'<json object here>' COLLATE 'utf8mb4_bin'
Is there anything I can change in the primary DB instance parameters? Or the aurora replica?
Any help on this is appreciated!
EDIT: More info on the schema
Char and coll variables of Aurora Replica:
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database latin1
character_set_filesystem utf8mb4
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
character_sets_dir /rdsdbbin/oscar-5.7.mysql_aurora.2.10.1.0.4.0/share/charsets/
collation_connection utf8mb4_general_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
Char and coll variables of primary DB:
character_set_client utf8mb4
character_set_connection utf8mb4
character_set_database latin1
character_set_filesystem binary
character_set_results utf8mb4
character_set_server latin1
character_set_system utf8
character_sets_dir /rdsdbbin/mysql-5.7.33.R2/share/charsets/
collation_connection utf8mb4_general_ci
collation_database latin1_swedish_ci
collation_server latin1_swedish_ci
(Note, I manually changed character_set_filesystem to utf8mb4 in the Aurora replica to try as a potential solution but it still gives the same error)
TABLE with error have exactly the same CREATE statement in primary DB and replica
CREATE TABLE `item_list` (
`_id` varchar(50) NOT NULL,
`item_id` varchar(50) NOT NULL,
`description_id` varchar(45) NOT NULL,
`user_id` varchar(45) NOT NULL,
`last_action` json DEFAULT NULL,
`item_info` json DEFAULT NULL,
PRIMARY KEY (`item_id`,`description_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
The query text in last_sql_error (text was cut off)
UPDATE item_list\n SET last_action = NAME_CONST('p_last_action',_utf8mb4'{\\"amount\\": 25380, \\"message\\": \\"Send to JL@CW\\", \\"actionId\\": \\"send\\", \\"photoPath\\": \\"https://s3-us-west-1.amazonaws.com/VBFrNVYIr.jpg\\"' COLLATE 'utf8mb4_bin') WHERE item_id = NAME_CONST('p_item_