MySQL binary log files take up a lot of space

One day you may learn an amazing fact that a lot of space on your computer is taken up by MySQL with not much data, actually being present in the database.
If you look inside MySQL database folder, you might see that there are many MySQL binary log files and they take up a lot of space. They might look like these: mysql-bin.000001, mysql-bin.000002, mysql-bin.000003 and so on.
These files are used for so-called binary log which in turn is used for replication and data recovery. If you don't need the binary log then you can simply turn it off, then all these files may be deleted.
To turn it off, just follow instruction below.
Find and comment out the line in file my.cnf by adding hash mark:
#log-bin=mysql-bin
Also all related options with the binary log must be commented out too, for example like this one:
#binlog_format=mixed
If some of them are not commented out then error messages are displayed in log file after restarting MySQL, for example like this one:
131022 11:14:24 [ERROR] You need to use --log-bin to make --binlog-format work. 131022 11:14:24 [ERROR] Aborting
To check your log file for error messages, the following commands can be used:
cat /var/db/mysql/*.err | grep ERROR | tail
Usually the my.cnf file has a path: /usr/local/etc/my.cnf in FreeBSD.
Now all binary log files can be removed from the folder /var/db/mysql:
cd /var/db/mysql rm mysql-bin.*
And the last thing - restart MySQL.
To check if it's really turned off, just try again to search for the same kind of files in the folder /var/db/mysql after MySQL is restarted.
If no such files were found this means that you've done a pretty good job! Nice work!