Skip to content

Can not start replication job with AWS RDS MYSQL Source #181

@damolaRocketRez

Description

@damolaRocketRez

Describe the bug
I can not start a replication process by running chameleon start_replica. Running the command provides this.

--------
SAVEPOINT `__EFSavePoint`
-------- 
2025-04-12 13:26:21 MainProcess ERROR global_lib.py (609): Read process alive: False - Replay process alive: True
2025-04-12 13:26:21 MainProcess ERROR global_lib.py (610): Stack trace: Traceback (most recent call last):
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pg_chameleon/lib/global_lib.py", line 535, in read_replica
    self.mysql_source.read_replica()
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pg_chameleon/lib/mysql_lib.py", line 1527, in read_replica
    replica_data=self.__read_replica_stream(batch_data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pg_chameleon/lib/mysql_lib.py", line 1340, in __read_replica_stream
    sql_tokeniser.parse_sql(binlogevent.query)
  File "/home/ubuntu/venv/lib/python3.12/site-packages/pg_chameleon/lib/sql_util.py", line 768, in parse_sql
    for stat_dic in multiple_sql_parser.parse(sql_string_cleanup):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/venv/lib/python3.12/site-packages/parsy/__init__.py", line 98, in parse
    (result, _) = (self << eof).parse_partial(stream)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/venv/lib/python3.12/site-packages/parsy/__init__.py", line 112, in parse_partial
    raise ParseError(result.expected, stream, result.furthest)
parsy.ParseError: expected one of ';', 'ALTER', 'CREATE', 'DROP', 'EOF', 'RENAME', 'TRUNCATE', '\\s+' at 0:0

To Reproduce
chameleon create_replica_schema --debug
chameleon add_source --config default --debug
chameleon init_replica --config default --debug
chameleon start_replica --config default --source example

Expected behavior
I expected the replication job to be created.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment(please complete the following information):

  • OS: Ubuntu 24.04.2 LTS
  • 10.6.20-MariaDB-log
  • PostgreSQL 17.2
  • Python Version Python 3.12.3
  • PostgreSQL on AWS RDS and MySQL on AWS RDS
    Additional context
MYSQL
binlog_row_image=FULL
binlog_format=ROW
expire_logs_days =0.00
binlog_row_metadata=NO_LOG
log-bin=/rdsdbdata/log/binlog/mysql-bin-changelog

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions