Disable binary logging in MySQL
NOTE: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.
Binary logging is enabled by default in MySQL 8.x and later. Follow the steps below to disable it:
Stop the MySQL server:
$ sudo installdir/ctlscript.sh stop mysql
Edit the MySQL configuration file, which depending on your installation type will be in one of the following locations:
* For Bitnami installations following Approach A (using Linux system packages): *installdir/mysql/conf/my.cnf* * For Bitnami installations following Approach B (self-contained installations): *installdir/mysql/my.cnf*
Add the line below in the [mysqld] configuration block, such that the result looks like this:
[mysqld] disable_log_bin ...
Start the MySQL server:
$ sudo installdir/ctlscript.sh start mysql
Existing binary log files will be automatically removed after 30 days, which is the default expiry period. To remove them manually, use the PURGE BINARY LOGS command described in the official MySQL documentation.