<?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>MariaDB คืออะไร Archives -</title>
	<atom:link href="https://www.vcowo.com/tag/mariadb-%e0%b8%84%e0%b8%b7%e0%b8%ad%e0%b8%ad%e0%b8%b0%e0%b9%84%e0%b8%a3/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.vcowo.com/tag/mariadb-คืออะไร/</link>
	<description>ดูแลเว็บไซต์ แบบ พรีเมี่ยม</description>
	<lastBuildDate>Fri, 16 Oct 2020 14:48:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://www.vcowo.com/wp-content/uploads/2018/04/cropped-vcowo-32x32.png</url>
	<title>MariaDB คืออะไร Archives -</title>
	<link>https://www.vcowo.com/tag/mariadb-คืออะไร/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MariaDB คืออะไร และ วิธีการติดตั้ง MariaDB</title>
		<link>https://www.vcowo.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mariadb/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e0%25b8%25a7%25e0%25b8%25b4%25e0%25b8%2598%25e0%25b8%25b5%25e0%25b8%2581%25e0%25b8%25b2%25e0%25b8%25a3%25e0%25b8%2595%25e0%25b8%25b4%25e0%25b8%2594%25e0%25b8%2595%25e0%25b8%25b1%25e0%25b9%2589%25e0%25b8%2587-mariadb</link>
					<comments>https://www.vcowo.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mariadb/#respond</comments>
		
		<dc:creator><![CDATA[Kem Kon]]></dc:creator>
		<pubDate>Fri, 24 Jul 2020 10:15:35 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MariaDB คืออะไร]]></category>
		<category><![CDATA[MariaDB คืออะไร และ วิธีการติดตั้ง MariaDB]]></category>
		<category><![CDATA[วิธีการติดตั้ง MariaDB]]></category>
		<guid isPermaLink="false">https://www.vcowo.com/?p=1543</guid>

					<description><![CDATA[<p>MariaDB เป็นระบบจัดการฐานข้อมูลที่เป็น Open Source (ฟรี) มักใช้เป็นอีกทางเลือกทดแทนในการจัดการ MySQL ของแพลตฟอร์มยอดนิยมอย่าง LAMP stack หรือ Linux, Apache, MySQL, PHP/Python/Perl  เจ้า MariaDB ถูกพัฒนาออกมาเพื่อต้องการมาแทนที่ MySQL ในระบบเหล่านี้</p>
<p>The post <a href="https://www.vcowo.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mariadb/">MariaDB คืออะไร และ วิธีการติดตั้ง MariaDB</a> appeared first on <a href="https://www.vcowo.com"></a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"> </p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img decoding="async" width="368" height="121" src="https://www.vcowo.com/wp-content/uploads/2020/07/image-1.png" alt="" class="wp-image-1556" srcset="https://www.vcowo.com/wp-content/uploads/2020/07/image-1.png 368w, https://www.vcowo.com/wp-content/uploads/2020/07/image-1-300x99.png 300w" sizes="(max-width: 368px) 100vw, 368px" /></figure></div>



<p class="wp-block-paragraph">MariaDB เป็นระบบจัดการฐานข้อมูลที่เป็น<strong> Open Source (ฟรี) </strong>มักใช้เป็นอีกทางเลือกทดแทนในการจัดการ MySQL ของแพลตฟอร์มยอดนิยมอย่าง LAMP stack หรือ Linux, Apache, MySQL, PHP/Python/Perl  เจ้า MariaDB ถูกพัฒนาออกมาเพื่อต้องการมาแทนที่ MySQL ในระบบเหล่านี้</p>



<p class="wp-block-paragraph"><strong>Tutorial </strong>นี้จะอธิบายถึงการติดตั้ง MariaDB เวอร์ชันล่าสุดบน <strong>server ที่มี CentOS 8</strong>  โดยเมื่อเทียบกันระหว่าง MariaDB และ My SQL นั้น  ตัว MariaDB จะมีแพคเกจที่ให้ใช้งานตามต้องการมากกว่าและสามารถทำงานแทนที่ MySQL ได้อย่างลงตัว</p>



<p class="wp-block-paragraph">Prerequisites</p>



<p class="wp-block-paragraph">สำหรับใน Tutorial นี้สิ่งที่ต้องมีคือ CentOS8 โดยต้องมีการตั้งค่า non-root sudo -enabled user จากนั้นให้ทำตาม step ต่อไปนี้ครับ เรามาเริ่มกันเลย</p>



<p class="has-medium-font-size wp-block-paragraph"><strong>1. ติดตั้ง MariaDB โดยการใช้ dnf ด้วย command</strong></p>



<p class="wp-block-paragraph"><code>$sudo dnf install mariadb-server</code></p>



<p class="wp-block-paragraph">เมื่อรันคำสั่งให้ตอบ yes ไปแล้วกดปุ่ม Enter เพื่อยืนยันการติดตั้ง เมื่อการติดตั้งเสร็จ ให้เริ่มใช้งาน service ด้วย systemctl:</p>



<p class="wp-block-paragraph"><code>$sudo systemctl start mariadb</code></p>



<p class="wp-block-paragraph">แล้วเช็คสถานะการทำงานของ Service ด้วย command</p>



<p class="wp-block-paragraph"><code>$sudo systemctl status mariadb</code></p>



<p class="wp-block-paragraph">เอาท์พุทที่ออกมาก็จะหน้าตาประมาณนี้</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="624" height="280" src="https://www.vcowo.com/wp-content/uploads/2020/07/image.png" alt="" class="wp-image-1547" srcset="https://www.vcowo.com/wp-content/uploads/2020/07/image.png 624w, https://www.vcowo.com/wp-content/uploads/2020/07/image-300x135.png 300w" sizes="(max-width: 624px) 100vw, 624px" /></figure>



<p class="wp-block-paragraph">ถ้าการติดตั้งสำเร็จจะมีเอาท์พุทออกมาบอกว่า active(running) และบรรทัดสุดท้ายจะมีการแสดงออกมาว่า Started MariaDB……</p>



<p class="wp-block-paragraph">ทีนี้ ในขั้นตอนต่อไปเราจะทำให้ MariaDB เริ่มทำงานตั้งแต่ตอนบูท โดยใช้ command </p>



<p class="wp-block-paragraph"><code>$ sudo systemctl enable mariadb</code></p>



<p class="wp-block-paragraph">เอาท์พุทที่ได้จะเป็นประมาณข้าง ล่างนี้</p>



<pre class="wp-block-code"><code>Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service→/usr/lib/systemd/system/mariadb.service.
</code></pre>



<p class="wp-block-paragraph">โอเคครับ ตอนนี้ MariaDB ติดตั้งสำเร็จแล้วและถูกตั้งให้เริ่มทำงานตั้งแต่เริ่มเปิดเครื่อง ขั้นตอนต่อไปเราจะเพิมความปลอดภัยให้กับ MariaDB Server กัน</p>



<p class="has-medium-font-size wp-block-paragraph"><strong>2. เพิ่มคามปลอดภัยให้ MariaDB server</strong></p>



<p class="wp-block-paragraph">ใน MariaDB นั้นจะมี script ด้านความปลอดภัยอยู่ ที่สามารถเข้าไปเปลี่ยนการตั้งค่าได้ เพราะบางทีค่า default ที่ตั้งไว้ก็อาจจะทำให้ระบบบางตัวยังมีความปลอดภัยที่ต่ำ เช่น การ remote root login และ sample user  โดยสามารถรันคำสั่ง</p>



<p class="wp-block-paragraph"><code>$ sudo mysql_secure_installation</code></p>



<p class="wp-block-paragraph">ในตัว <strong>script </strong>มีคำอธิบายต่างๆอย่งละเอียดไว้แล้ว เพราะฉะนั้นไม่ต้องห่วงว่าจะยาก ในขั้นตอนแรกระบบจะถาม root password ก่อน ซึ่งในตอนแรกมันจะยังไม่ถูก set ไว้ให้กด ENTER ผ่านไปได้เลย จากนั้นให้เราตั้งค่า root password ของเรา โดย root ตั้วนี้นั้นจะเป็น root ของ database user ไม่ใช่ root user ของ centOS แต่อย่างใด จากนั้นกด Y แล้ว Enter เพื่ออัพเดต password จากนั้นจะมีให้กดยืนยันรับทราบคำแนะนำด้าน security จากนั้น anonymous user (User นิรนาม) จะถูกปิดการอนุญาตในการควบคุมทางไกลด้วย root login, ถอน test database และมีการ reload ตัว privilege tables   เมื่อเสร็จขั้นตอนนี้แล้ว ระบบความปลอดภัยของ MariaDB ก็จะมากขึ้น ต่อไปเราต้องทำการทดสอบว่า MariaDB ใช้งานได้หรือไม่ ไปขั้นต่อไปกันเลย</p>



<p class="has-medium-font-size wp-block-paragraph"><strong>3. ทดสอบการติดตั้ง</strong></p>



<p class="wp-block-paragraph">ทำการเชื่อมต่อด้วย mysqladmin ใช้ command ต่อไปนี้เพื่อเชื่อมต่อ MariaDB แบบ Root (-u root)  และให้ MariaDB แสดง version ด้วย</p>



<p class="wp-block-paragraph"><code>$mysqladmin -u root -p version</code></p>



<p class="wp-block-paragraph">เอาท์พุทที่ได้ก็จะประมาณนี้ครับ</p>



<pre class="wp-block-code"><code>Output
mysqladmin  Ver 9.1 Distrib 10.3.17-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Server version      10.3.17-MariaDB
Protocol version    10
Connection      Localhost via UNIX socket
UNIX socket     /var/lib/mysql/mysql.sock
Uptime:         6 min 5 sec

Threads: 7  Questions: 16  Slow queries: 0  Opens: 17  Flush tables: 1  Open tables: 11  Queries per second avg: 0.043
</code></pre>



<p class="wp-block-paragraph">ถ้าเอาท์พุทออกมาแบนี้ก็แสดงว่าทุกอย่างเป็นอันเรียบร้อย</p>



<p class="wp-block-paragraph"><strong><a href="https://www.vcowo.com/%e0%b8%9f%e0%b8%a3%e0%b8%b5-%e0%b9%80%e0%b8%84%e0%b8%a3%e0%b8%94%e0%b8%b4%e0%b8%95-digital-ocean-%e0%b8%9b%e0%b8%b5-2020-100/" target="_blank" aria-label="undefined (opens in a new tab)" rel="noreferrer noopener">Free Digital Ocean 100$</a></strong></p>
<p>The post <a href="https://www.vcowo.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mariadb/">MariaDB คืออะไร และ วิธีการติดตั้ง MariaDB</a> appeared first on <a href="https://www.vcowo.com"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vcowo.com/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-mariadb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
