<?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>Moving Archives - Vavai&#039;s Personal Notes</title>
	<atom:link href="https://www.vavai.net/tag/moving/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.vavai.net/tag/moving/</link>
	<description>Life is our precious gift</description>
	<lastBuildDate>Wed, 12 Feb 2014 11:29:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>WHM/CPanel : How to Move MySQL Data Folder</title>
		<link>https://www.vavai.net/whmcpanel-how-to-move-mysql-data-folder/</link>
					<comments>https://www.vavai.net/whmcpanel-how-to-move-mysql-data-folder/#respond</comments>
		
		<dc:creator><![CDATA[Muhammad Rivai]]></dc:creator>
		<pubDate>Wed, 12 Feb 2014 11:29:45 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CPanel]]></category>
		<category><![CDATA[Moving]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SLES]]></category>
		<category><![CDATA[SUSE Family]]></category>
		<category><![CDATA[WHM]]></category>
		<guid isPermaLink="false">http://v2.vavai.net/?p=1712</guid>

					<description><![CDATA[<p>Last week, I checked WHM (Web Hosting Management) server which used by this blog,  Excellent website and  Vavai.com due to an error messages regarding failed WHM update. After a few checking, it seems that root partition only left a bit free space and one of the largest folder  is var/lib/mysql which contain a MySQL server databases. Before the partition...</p>
<p>The post <a href="https://www.vavai.net/whmcpanel-how-to-move-mysql-data-folder/">WHM/CPanel : How to Move MySQL Data Folder</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><a href="http://54.254.121.108/wp-content/uploads/2014/02/mysql-logo.jpg"><img decoding="async" class="alignleft  wp-image-1718" style="margin: 5px;" alt="mysql-logo" src="http://54.254.121.108/wp-content/uploads/2014/02/mysql-logo.jpg" width="239" height="175" srcset="https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/mysql-logo.jpg 399w, https://d3b35uem336dgh.cloudfront.net/wp-content/uploads/2014/02/mysql-logo-300x219.jpg 300w" sizes="(max-width: 239px) 100vw, 239px" /></a>Last week, I checked WHM (Web Hosting Management) server which used by <a href="http://v2.vavai.net">this blog</a>,  <a href="http://www.excellent.co.id">Excellent </a>website and  <a href="http://www.vavai.com">Vavai.com</a> due to an error messages regarding failed WHM update. After a few checking, it seems that root partition only left a bit free space and one of the largest folder  is <b>var/lib/mysql </b>which contain a MySQL server databases. Before the partition getting lower and lower and would caused another problem, I decided to move the folder to another bigger partition.<br />
The following are the processes which I have done to prevent further problem. Please note that while doing this setting, there will be a minimal down time (1-2 minutes). In this case, I prepare different partition on /dev/sdc1 which have approximately 100 GB free space and mounted to /srv/whm) :<span id="more-1712"></span></p>
<ol>
<li>Go to WHM, choose Service Manager menu and uncheck on <strong>Monitoring MySQL </strong>option  then click save. It&#8217;s an important step to prevent MySQL services to being automatically restart by WHM service monitor</li>
<li>SSH or Putty to WHM console and run the following command :
<pre>mkdir -p /srv/backup/
chmod 777 -R /srv/backup
mysqldump --all-databases | gzip &gt; /srv/backup/alldatabases.sql.gz
rsync -av /var/lib/mysql /srv/whm/
chown -R mysql:mysql /srv/whm/mysql
/etc/init.d/mysql stop
rsync -av --delete-after /var/lib/mysql /srv/whm/
mv /var/lib/mysql /srv/backup
ln -s /srv/whm/mysql /var/lib/mysql
/etc/init.d/mysql start</pre>
</li>
<li><span style="line-height: 1.5em;">Back again to WHM, choose Service Manager and check on monitoring MySQL then save</span></li>
</ol>
<p>On the above step, I choose to take a safe precaution, so I back up the data using rsync command before moving the data.  It would take longer steps but safer than the simple steps but  has risk of data loss. If you feel confident, you can ignore the rsync command and  just go through the instruction : Shutting down MySQL service, move the data into another folder, then make the symlink, and finally re-activate the MySQL services.<br />
Actually, those instructions are should be applicable for non WHM MySQL server, for example, to move the mysql data on openSUSE / SLES server.</p>
<p>The post <a href="https://www.vavai.net/whmcpanel-how-to-move-mysql-data-folder/">WHM/CPanel : How to Move MySQL Data Folder</a> appeared first on <a href="https://www.vavai.net">Vavai&#039;s Personal Notes</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.vavai.net/whmcpanel-how-to-move-mysql-data-folder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 11/65 objects using Disk
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: d3b35uem336dgh.cloudfront.net
Lazy Loading (feed)
Minified using Disk
Database Caching 15/44 queries in 0.018 seconds using Disk

Served from: www.vavai.net @ 2026-10-29 06:12:04 by W3 Total Cache
-->