<?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>MySQL Archives - Techforce global</title>
	<atom:link href="https://techforceglobal.com/blog-category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>https://techforceglobal.com/blog-category/mysql/</link>
	<description></description>
	<lastBuildDate>Tue, 11 Apr 2023 10:32:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://techforceglobal.com/wp-content/uploads/2022/07/favicon.ico</url>
	<title>MySQL Archives - Techforce global</title>
	<link>https://techforceglobal.com/blog-category/mysql/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>MYSQL Database replication configuration without server downtime</title>
		<link>https://techforceglobal.com/blog/mysql-database-replication-configuration-without-server-downtime/</link>
					<comments>https://techforceglobal.com/blog/mysql-database-replication-configuration-without-server-downtime/#respond</comments>
		
		<dc:creator><![CDATA[techforceNew16]]></dc:creator>
		<pubDate>Fri, 04 Mar 2022 07:42:00 +0000</pubDate>
				<guid isPermaLink="false">https://dev.techforce.global/?post_type=blog&#038;p=1724</guid>

					<description><![CDATA[Steps to setup MySQL replication with zero master downtime:  Make the below changes in the my.ini file of a master MySQL server instance, to enable binary logs: server-id=1 (can have any unique digit)  log-bin=mysql-bin  Restart the master instance. Create replication user in a master instance by firing below queries in master: CREATE USER repluser@'&#60;master IP&#62;&#8217; [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><span class="TextRun BCX0 SCXW136089235" lang="EN-US" xml:lang="EN-US" data-contrast="none"><span class="NormalTextRun BCX0 SCXW136089235" data-ccp-parastyle="heading 3">Steps to </span><span class="NormalTextRun ContextualSpellingAndGrammarErrorV2 BCX0 SCXW136089235" data-ccp-parastyle="heading 3">setup</span><span class="NormalTextRun BCX0 SCXW136089235" data-ccp-parastyle="heading 3"><span style="color: #ff9900;"><a style="color: #ff9900;" href="https://techforceglobal.com/mysql-development"> MySQL</a></span> replication with zero master downtime:</span></span><span class="EOP BCX0 SCXW136089235" data-ccp-props="{&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}"> </span></p>
<ol>
<li><span data-contrast="none"> Make the below changes in the my.ini file of a master MySQL server instance, to enable binary logs:</span></li>
</ol>
<p style="text-align: left; padding-left: 40px;"><span data-contrast="none"><span style="color: #ff0000;">server-id=1</span> </span><span data-contrast="none">(can have any unique digit)</span><span data-ccp-props="{&quot;201341983&quot;:1,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:300}"> </span></p>
<p style="text-align: left; padding-left: 40px;"><span style="color: #ff0000;" data-contrast="none">log-bin=mysql-bin</span><span data-ccp-props="{&quot;201341983&quot;:1,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:300}"> </span></p>
<ol start="2">
<li><span data-contrast="none"> Restart the master instance.</span></li>
<li><span data-contrast="none"> Create replication user in a master instance by firing below queries in master:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">CREATE USER repluser@'&lt;master IP&gt;&#8217; IDENTIFIED BY &#8216;replpass&#8217;; </span></p>
<p style="padding-left: 40px;"><span style="color: #ff0000;">GRANT REPLICATION SLAVE ON *.* TO repluser@'&lt;slave IP&gt;&#8217;; </span></p>
<ol start="4">
<li><span data-contrast="none"> Take a full dump of Master instance. While firing command for mysqldump, include “–master-data=2” in options. It won’t lock tables. This will include one commented SQL query which will contain a master’s current log position. This type of dump is known as Point-in-Time dump.</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">mysqldump &#8211;skip-lock-tables &#8211;single-transaction &#8211;flush-logs &#8211;hex-blob &#8211;master-data=2 -A &gt; ~/mysqldump.sql </span></p>
<ol start="5">
<li><span data-contrast="none"> Once dump is over, import it on the slave server.</span></li>
<li><span data-contrast="none"> Find and copy the bin log position and file name in dump SQL file. It must be there on 22nd or 80th line number in dump file.</span></li>
<li><span data-contrast="none"> Make below changes in my.ini file of slave instance:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">server-id=2 (can have any unique digit) </span></p>
<p style="padding-left: 40px;"><span style="color: #ff0000;">relay-log-index=slave-relay-bin.index </span></p>
<p style="padding-left: 40px;"><span style="color: #ff0000;">relay-log=slave-relay-bin </span></p>
<ol start="8">
<li><span data-contrast="none"> If you want to make slave server read-only (for non-replication users), then add below lines in my.ini of slave instance:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">read_only=1 </span></p>
<p style="padding-left: 40px;"><span style="color: #ff0000;">super_read_only=1 </span></p>
<ol start="9">
<li><span data-contrast="none"> Restart the slave instance.</span></li>
<li><span data-contrast="none"> Fire below query to make Master configurations in slave instance:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;" data-contrast="none">CHANGE MASTER TO MASTER_HOST='&lt;master IP&gt;&#8217;, MASTER_PORT=&lt;master Port&gt;, MASTER_USER='&lt;user’s username created in #3&gt;&#8217;, MASTER_PASSWORD='&lt;user’s password created in #3&gt;&#8217;, MASTER_LOG_FILE='&lt;log file name copied from #6&gt;&#8217;, MASTER_LOG_POS=&lt;log file position copied from #6&gt;;</span><span data-ccp-props="{&quot;201341983&quot;:1,&quot;335551550&quot;:6,&quot;335551620&quot;:6,&quot;335559739&quot;:160,&quot;335559740&quot;:300}"> </span></p>
<ol start="11">
<li><span data-contrast="none"> Start the slave by firing below query in slave:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">START SLAVE; </span></p>
<ol start="12">
<li><span data-contrast="none"> To view the slave status and verify it, fire below query in slave:</span></li>
</ol>
<p style="padding-left: 40px;"><span style="color: #ff0000;">SHOW SLAVE STATUS; </span></p>
<ol start="13">
<li><span data-contrast="none"> Find “Slave_IO_running” and “Slave_SQL_Running” column and if everything went right, they should contain “Yes” as a value.</span></li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://techforceglobal.com/blog/mysql-database-replication-configuration-without-server-downtime/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

Page Caching using Disk: Enhanced 

Page cache debug info:
Engine:             Disk: Enhanced
Cache key:          techforceglobal.com/blog-category/mysql/feed/_index_slash_ssl.xml
Creation Time:      1774396496.000s
Header info:
Last-Modified:      Wed, 18 Mar 2026 04:48:53 GMT
ETag:               "175b4f37959593a019afceb7cf43d3d3"
Link:               <https://techforceglobal.com/blog-category/mysql/>; rel="canonical"
Content-Type:       application/rss+xml; charset=UTF-8

Lazy Loading (feed)

Served from: techforceglobal.com @ 2026-03-24 23:54:56 by W3 Total Cache
-->