MySQL save storage and deactivate bin log

In some cases binary logs are not useful or unwanted and cost performance as well as space.

First, you have to edit your setting file (i.e. /etc/mysql/my.ini) and change the log-bin value to:

# /etc/mysql/my.ini
# ...

[mysqld]
skip-log-bin
# ...

To force the new settings, you have to restart the mysql service like this, but keep in mind that your server will be unavailable for some time:

service mysql restart

Now you can remove old logs by calling the following SQL command:

PURGE BINARY LOGS TO 'mysqld-bin.000048';