Binary logs in MySQL are enabled by default in MySQL 8.0. They are used for replication and point in time backup recovery, but are not always required.
As they are enabled by default, when you upgrade to MySQL 8.0 you need to be sure that you need them or you will find that you disk quickly fills with data.
To turn this off on Ubuntu you need to find the configuration file located at "/etc/mysql/mysql.conf.d/mysqld.cnf". This won't work if you edit a configuration file that MySQL doesn't pick up.
In the section marked with "[mysqld]" (for the MySQL daemon) add the following clause.
skip-log-bin
Restart MySQL for this setting to take effect.
sudo service mysqld restart
To check that the binary log is off run the following SQL.
SELECT * FROM performance_schema.global_variables WHERE VARIABLE_NAME IN ('log_bin');
This should show you the following.
+---------------+----------------+
| VARIABLE_NAME | VARIABLE_VALUE |
+---------------+----------------+
| log_bin | OFF |
+---------------+----------------+
1 row in set (0.03 sec)
Binary logs will now be off.
Please make sure that you do not want the binary logs to be on before disabling them.
Add new comment