---
title: "Disabling Binary Logging (binlog) in MySQL 8 (Cloud IDE)"
date: "2025-10-27T14:00:38+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/cloud-ide/help/94731-disabling-binary-logging-binlog-mysql-8-cloud-ide"
id: "6da4157b-ec3f-4640-8b0c-a177e6480be1"
---

Note

These instructions are specifically for environments using Cloud IDE.

Overview
--------

Binary logging (binlog) in MySQL enables replication and data recovery. If you do not require these features, disable binlog to improve performance and reduce disk usage. This article provides step-by-step instructions on how to disable binlog in MySQL 8 within the Cloud IDE.

Purging existing binary logs
----------------------------

If binlog is enabled, existing log files can consume significant disk space. You must manually purge these files.

To purge existing binlogs:

1.  To confirm that binlog is active and to identify the log files, run:
    
        drush sqlq "SHOW VARIABLES LIKE 'log_bin';"
        drush sqlq "SHOW BINARY LOGS;"
    
    The system displays `log_bin ON`.
    
2.  To purge all binlog files created before a specific file, such as `binlog.000076`, run: 
    
        drush sqlq "PURGE BINARY LOGS TO 'binlog.000076';"
    

This command removes all logs listed before the specified filename.

Disabling Binlog in Cloud IDE
-----------------------------

To disable binlog in Cloud IDE:

1.  Edit the MySQL configuration file.
    
        /home/ide/configs/mysql/settings.cnf
    
2.  Locate the `[mysqld]` section in the file and add the following line to disable binlog:
    
        skip-log-bin
    
    For example:
    
        [mysqld]
        skip-log-bin
    
3.  Save your changes and close the configuration file.
4.  Restart the MySQL service to apply the changes. Run the following command:
    
        acli ide:service-restart mysql
    
5.  Run the following command to verify that binlog is disabled:
    
        drush sqlq "SHOW VARIABLES LIKE 'log_bin';"
    
    The following output is displayed:
    
        +---------------+-------+
        | Variable_name | Value |
        +---------------+-------+
        | log_bin       | OFF   |
        +---------------+-------+
    

Note

To re-enable binlog in the future, remove or comment out the `skip-log-bin` line and restart MySQL.