clean excess binary logs from mysql - free up space
Update: 30 July 2023
I actually prefer this command, i just have to figure out why im getting so many binlog files!
PURGE BINARY LOGS BEFORE '2023-07-30 00:00:00';
PURGE BINARY LOGS BEFORE NOW();
go into /var/lib/mysql/
check the latest bin log file name
load mysql command
run the following to purge all bin log files before the last one.
PURGE BINARY LOGS TO 'binlog.000319';
Check the disk space
This should now free up a lot more space!
Filesystem 1K-blocks Used Available Use% Mounted on udev 984416 0 984416 0% /dev tmpfs 203072 936 202136 1% /run /dev/vda1 34030160 14712892 17570888 46% /