Posted in
6087
1:16 am, July 4, 2023
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!
MYSQL
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
e.g: binlog.000319
load mysql command
run the following to purge all bin log files before the last one.
MYSQL
PURGE BINARY LOGS TO 'binlog.000319';
Check the disk space
df -h
This should now free up a lot more space!
HTML
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% /
View Statistics
This Week
138
This Month
3002
This Year
2127
Add Comment
Other Items in mysql
Related Search Terms
Other Categories in Code
alpine js apps c css factorio font awesome images linux quick modals sqlite site bugs site updates slick slider sliders testing windows apps apache api apps asp bat bootstrap bootstrap templates charts cookies core css css filters css grid design elements docker domains emoji fancybox fonts foundation framework gimp git html icons ideas image formatting images javascript javascript functions jquery js linux mac misc modals mysql nginx node php php errors php function php functions php simple html dom pi400 python react regex sections simple_html_dom simplepie php site bugs site documentation slick slider sql sqlite ssh sublime svg svg css templates tools virtual box vscode vue webdev windows windows 11 windows commands wordpress