We earn commission when you buy through affiliate links.

This does not influence our reviews or recommendations.Learn more.

Procedure to disable binary logs in MariaDB and MySQL database.

This was logged in Google Cloud logs.

So, I started investigating and found/var/log/mysqlwas taking ~50% of total storage.

And, after listing the files.

It was binary logs.

You may think of deleting them to recover the system but keep in mind it will fill up again.

So, the best way to prevent this is to instruct MariaDB not to log.

I dont have replica implementation so it is ok to kill the binary logging.

It is a simpleone-line configuration.

If using MySQL

Now, you’re able to delete those binaries files under/var/lib/mysql.