<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>紀錄 &#8211; 21點情報網</title>
	<atom:link href="https://ailog.tw/lifelog/tag/%E7%B4%80%E9%8C%84/feed/" rel="self" type="application/rss+xml" />
	<link>https://ailog.tw/lifelog</link>
	<description></description>
	<lastBuildDate>Wed, 27 Jan 2021 05:41:23 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>MariaDB and MySQL關閉二進位記錄檔方法</title>
		<link>https://ailog.tw/lifelog/2021/01/27/mysql-off-log/</link>
		
		<dc:creator><![CDATA[blackjack]]></dc:creator>
		<pubDate>Wed, 27 Jan 2021 05:41:23 +0000</pubDate>
				<category><![CDATA[3C資訊]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Binary Log]]></category>
		<category><![CDATA[Disable]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[MariaDB and MySQL關閉二進位記錄檔方法]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[off]]></category>
		<category><![CDATA[二進位]]></category>
		<category><![CDATA[紀錄]]></category>
		<category><![CDATA[關閉]]></category>
		<guid isPermaLink="false">https://ailog.tw/lifelog/?p=6588</guid>

					<description><![CDATA[當系統有安裝MySQL或MariaDB資料庫系統時，日子一久了就會發現資料庫的log檔案還佔據不少空間，如果系 &#8230; <p class="link-more"><a href="https://ailog.tw/lifelog/2021/01/27/mysql-off-log/" class="more-link">閱讀全文<span class="screen-reader-text">〈MariaDB and MySQL關閉二進位記錄檔方法〉</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>當系統有安裝MySQL或MariaDB資料庫系統時，日子一久了就會發現資料庫的log檔案還佔據不少空間<span id="more-6588"></span>，如果系統並非是重要系統，且沒採用資料庫同步的機制，其實是可以將資料庫的二進位記錄檔關閉，來達到節省硬碟空間的目的。</p>
<p><span style="font-size: 14pt;"><strong>MySQL資料庫<br />
</strong></span>(1)、編輯設定檔案<br />
指令：<br />
vi /etc/my.cnf.d/mysql-server.cnf<br />
或<br />
vi /etc/my.cnf.d/server.cnf<br />
在「 <span style="color: #ff0000;">[mysqld]</span> 」下方新增「<span style="color: #ff0000;">skip-log-bin</span>」<br />
<img decoding="async" class="alignnone wp-image-6591 size-full" src="https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-01.jpg" alt="" width="482" height="76" srcset="https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-01.jpg 482w, https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-01-300x47.jpg 300w" sizes="(max-width: 482px) 100vw, 482px" /></p>
<p>(2)、重新啟動服務<br />
指令：<br />
service mysqld restart</p>
<p>(3)、刪除舊有log檔案<br />
指令：<br />
rm -rf /var/log/mysql/*.*</p>
<p><span style="font-size: 14pt;"><strong>MariaDB資料庫<br />
</strong><span style="font-size: 12pt;">(1)、編輯設定檔案</span></span><br />
指令：<br />
vi /etc/mysql/conf.d/mariadb.cnf<br />
在「 <span style="color: #ff0000;">[mysqld]</span> 」下方新增「<span style="color: #ff0000;">skip-log-bin</span>」<br />
<img fetchpriority="high" decoding="async" class="alignnone wp-image-6592 size-full" src="https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-02.jpg" alt="" width="365" height="209" srcset="https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-02.jpg 365w, https://ailog.tw/lifelog/wp-content/uploads/2021/01/mysql-02-300x172.jpg 300w" sizes="(max-width: 365px) 100vw, 365px" /></p>
<p>(2)、重新啟動服務<br />
指令：<br />
systemctl restart mariadb</p>
<p>(3)、刪除舊有log檔案<br />
指令：<br />
rm -rf var/log/mariadb/*.*</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
