Symptom and cause
Symptom: the directory /var/lib/mysql/ is taking an increasing amount of space because of the numerous “server-bin.n” or mysql-bin.00000n files stored there.
This is because /etc/mysql/my.cnf has:
Binary logging is used for data recovery and for replication with master/slave servers.
To clear those binary log files, you must first decide whether you want/need binary logging or not.
Disable binary logging
disable log-bin and related settings as below (comment out or delete):