How to Enable Binary Logging for MySQL on Railway.app

vonber
TRIAL

a year ago

Hi Railway Community,

I’m currently working on a project that requires change data capture (CDC) functionality, and for that, I need to enable binary logging on my MySQL instance hosted on Railway.app. I’ve encountered an error stating that binary logging is not enabled, and I need some guidance on how to configure this.

Error Details:

ERROR: The capture cannot run due to the following error(s): - Binary logging is not enabled: system variable 'log_bin' = "OFF" - User "power_bi" needs the REPLICATION CLIENT permission

What I’ve Tried:

1. SQL Commands: I attempted to set some global parameters via SQL:

SET GLOBAL server_id = 1;

SET GLOBAL binlog_format = 'ROW';

SET GLOBAL binlog_row_image = 'FULL';

1. These commands were executed successfully, but I understand that enabling log_bin typically requires changes to the MySQL configuration file and a server restart.

2. Documentation and Settings: I reviewed the Railway.app documentation and checked the dashboard for any configuration options related to MySQL settings but didn’t find a way to enable binary logging directly.

Request:

Could anyone provide guidance on how to enable binary logging for MySQL on Railway.app? Is there a specific procedure or support request process I should follow? If this requires intervention from the Railway support team, what’s the best way to contact them and what details should I include in my request?

thanks!

Solved

1 Replies

a year ago

Binary logging is indeed turned off by default because it bloats up the volume space and MySQL never cleans up after itself.

To enable it remove just the --disable-log-bin flag from the start command in the service settings for MySQL.


Status changed to Solved railway[bot] about 1 year ago