
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.thelinuxwiki.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=delete_mysql_bin_files_to_clear_space</id>
		<title>delete mysql bin files to clear space - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.thelinuxwiki.com/index.php?action=history&amp;feed=atom&amp;title=delete_mysql_bin_files_to_clear_space"/>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=delete_mysql_bin_files_to_clear_space&amp;action=history"/>
		<updated>2026-04-29T00:29:51Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.5</generator>

	<entry>
		<id>http://www.thelinuxwiki.com/index.php?title=delete_mysql_bin_files_to_clear_space&amp;diff=1456&amp;oldid=prev</id>
		<title>Nighthawk at 16:11, 17 November 2023</title>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=delete_mysql_bin_files_to_clear_space&amp;diff=1456&amp;oldid=prev"/>
				<updated>2023-11-17T16:11:33Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:11, 17 November 2023&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;taken from...&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;taken from...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[https://www.geekdecoder.com/delete-mysql-bin-files-safely/]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;https://www.geekdecoder.com/delete-mysql-bin-files-safely/ &lt;/ins&gt;https://www.geekdecoder.com/delete-mysql-bin-files-safely/]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:mysql]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[category:mysql]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nighthawk</name></author>	</entry>

	<entry>
		<id>http://www.thelinuxwiki.com/index.php?title=delete_mysql_bin_files_to_clear_space&amp;diff=1455&amp;oldid=prev</id>
		<title>Nighthawk: Created page with &quot; The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.inde...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.thelinuxwiki.com/index.php?title=delete_mysql_bin_files_to_clear_space&amp;diff=1455&amp;oldid=prev"/>
				<updated>2023-11-17T16:11:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.inde...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
The file mysql-bin.index keeps a list of all binary logs mysqld has generated and auto-rotated. The mechanisms for cleaning out the binlogs in conjunction with mysql-bin.index are:&lt;br /&gt;
&lt;br /&gt;
PURGE BINARY LOGS TO ‘binlogname’;&lt;br /&gt;
&lt;br /&gt;
PURGE BINARY LOGS BEFORE ‘datetimestamp’;&lt;br /&gt;
&lt;br /&gt;
These will clear all binary logs before the binlog or timestamp you just specified.&lt;br /&gt;
&lt;br /&gt;
erase all binary logs before ‘mysql-bin.000223’.&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; PURGE BINARY LOGS TO 'mysql-bin.000223';&lt;br /&gt;
&lt;br /&gt;
run&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0 SECOND;&lt;br /&gt;
&lt;br /&gt;
this will erase all binary logs before midnight 3 days ago.&lt;br /&gt;
&lt;br /&gt;
If you want to have binlog rotated away automatically and keep 3 days woth, simply set this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 mysql&amp;gt; SET GLOBAL expire_logs_days = 3;&lt;br /&gt;
&lt;br /&gt;
add this /etc/my.cnf&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
 expire-logs-days=3&lt;br /&gt;
and mysqld will delete them logs for you&lt;br /&gt;
&lt;br /&gt;
taken from...&lt;br /&gt;
&lt;br /&gt;
[https://www.geekdecoder.com/delete-mysql-bin-files-safely/]&lt;br /&gt;
&lt;br /&gt;
[[category:mysql]]&lt;/div&gt;</summary>
		<author><name>Nighthawk</name></author>	</entry>

	</feed>