Skip to content

The script has encountered an error #87

@liandong00

Description

@liandong00

_mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-data' at line 1

MariaDB version is 10.0.17
The detailed debug logs are as follows

mchr  | [binlogrepl 2025-01-23 06:14:02,414     INFO] server_id: 837311062
mchr  | [binlogrepl 2025-01-23 06:14:02,414     INFO] log_pos: 326
mchr  | [binlogrepl 2025-01-23 06:14:02,414     INFO] log_file: mysql-bin.000006
mchr  | [binlogrepl 2025-01-23 06:14:02,419    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:02,419    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:02,723    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:02,723    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,028    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,028    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,332    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,332    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,637    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,637    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,942    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:03,942    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,247    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,247    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,551    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,552    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,857    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:04,857    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,161    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,162    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,466    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,466    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,770    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:05,771    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,075    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,076    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,380    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,380    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [runner 2025-01-23 06:14:06,632     INFO] running replication for youtube-data (initial replication not finished - waiting)
mchr  | [binlogrepl 2025-01-23 06:14:06,686    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,686    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,990    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:06,991    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:07,295    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:07,295    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)
mchr  | Traceback (most recent call last):
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 755, in cmd_query
mchr  |     self._cmysql.query(
mchr  | _mysql_connector.MySQLInterfaceError: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-data' at line 1
mchr  |
mchr  | The above exception was the direct cause of the following exception:
mchr  |
mchr  | Traceback (most recent call last):
mchr  |   File "/usr/local/bin/mysql_ch_replicator", line 8, in <module>
mchr  |     sys.exit(main())
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql_ch_replicator/main.py", line 152, in main
mchr  |     run_db_replicator(args, config)
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql_ch_replicator/main.py", line 92, in run_db_replicator
mchr  |     db_replicator = DbReplicator(
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql_ch_replicator/db_replicator.py", line 115, in __init__
mchr  |     self.mysql_api = MySQLApi(
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql_ch_replicator/mysql_api.py", line 15, in __init__
mchr  |     self.reconnect_if_required()
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql_ch_replicator/mysql_api.py", line 42, in reconnect_if_required
mchr  |     self.cursor.execute(f'USE {self.database}')
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql/connector/cursor_cext.py", line 351, in execute
mchr  |     self._connection.cmd_query(
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
mchr  |     return method(cnx, *args, **kwargs)
mchr  |   File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 763, in cmd_query
mchr  |     raise get_mysql_exception(
mchr  | mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-data' at line 1
mchr  | [binlogrepl 2025-01-23 06:14:07,600    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.RotateEvent'>, ('mysql-bin.000006', 326)
mchr  | [binlogrepl 2025-01-23 06:14:07,600    DEBUG] received event <class 'mysql_ch_replicator.pymysqlreplication.event.FormatDescriptionEvent'>, ('mysql-bin.000006', 326)

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