<?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>Software development &#124; VR Software &#187; MySql</title>
	<atom:link href="http://vrsoftware.biz/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://vrsoftware.biz</link>
	<description>Web based application development</description>
	<lastBuildDate>Fri, 10 Oct 2014 18:32:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Set up simple master -&gt; slave replication with mysql</title>
		<link>http://vrsoftware.biz/set-up-simple-master-slave-replication-with-mysql/</link>
		<comments>http://vrsoftware.biz/set-up-simple-master-slave-replication-with-mysql/#comments</comments>
		<pubDate>Tue, 27 Nov 2012 11:06:05 +0000</pubDate>
		<dc:creator><![CDATA[VR Software]]></dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[slave]]></category>

		<guid isPermaLink="false">http://vrsoftware.biz/?p=127</guid>
		<description><![CDATA[So you have your mysql database running on lets call it SERVER01 and now you want to replicate data to SERVER02, maybe for failover, or just to take load off the master machine so you can do backups and reporting<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://vrsoftware.biz/set-up-simple-master-slave-replication-with-mysql/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>So you have your mysql database running on lets call it SERVER01 and now you want to replicate data to SERVER02, maybe for failover, or just to take load off the master machine so you can do backups and reporting of the slave machine.</p>
<h2>Setting everything up</h2>
<p>On<strong> SERVER01</strong> (this will be the replication Master) you will need to add the following to the my.cnf file:<br />
<code><br />
bind-address=SERVER01's IP ADDRESS<br />
log_bin=/var/log/mysql/mysql-bin.log<br />
server-id=100<br />
innodb_flush_log_at_trx_commit=1<br />
sync_binlog=1<br />
</code><br />
Make sure that skip-networking is disabled!</p>
<p>If you use functions and are sure they don&#8217;t modify data &#8211; are save for replication &#8211; you may want to add the following line the my.cnf as well:<br />
<code><br />
log-bin-trust-function-creators=1<br />
</code></p>
<p>In mysql create a replication user and grant them access to all databases:<br />
<code><br />
mysql&gt; CREATE USER 'replusr'@'localhost' IDENTIFIED BY 'password';<br />
mysql&gt; GRANT ALL ON *.* to replusr@'10.0.0.2' IDENTIFIED BY 'password';<br />
mysql&gt; FLUSH PRIVILEGES;<br />
</code></p>
<p>Restart the MySql server to load the updated my.cnf file</p>
<p>&nbsp;</p>
<p>On<strong> SERVER02 </strong>(this will be the replication slave) install mysql and add the following to the my.cnf file:<br />
<code><br />
bind-address=SERVER02's IP ADDRESS<br />
log_bin=/var/log/mysql/mysql-bin.log<br />
server-id=101<br />
</code><br />
<em>Note</em> that the server-id MUST be different from the master and any other slaves you set up for replication.</p>
<h2>Starting replication</h2>
<p>On<strong> SERVER01</strong> (the replication Master)</p>
<p>Open two terminals with mysql.  In the first terminal run:<br />
<code><br />
mysql&gt; FLUSH TABLES WITH READ LOCK;<br />
</code></p>
<p>In the second terminal run:<br />
<code><br />
mysql&gt; SHOW MASTER STATUS;<br />
</code><br />
Write down the values for the column FILE and POSITION. You will need them later when setting up the Slave! (the values will look like mysql-bin.000001 and 106).</p>
<p>In the second terminal exist mysql and issue the following command to backup all databases, so you can import them on the slave machine:<br />
<code><br />
shell&gt; mysqldump --all-databases --master-data &gt; dbdump.db<br />
</code><br />
The backup may take a while if you have a big database.  Once completed you can go to terminal one and close it, this will automatically release the lock and allow you to continue using the master normally.<br />
Copy the backup file (dbdump.db) to the slave machine and continue with the next steps.</p>
<p>&nbsp;</p>
<p>On<strong> SERVER02</strong> (the replication Slave)</p>
<p>Start the MySql server with the &#8211;skip-slave-start option so that replication doesn&#8217;t start and import the database backup you copied from the master.<br />
<code><br />
shell&gt; mysqld_safe –-skip-slave-start<br />
shell&gt; mysql –u root –p &lt; dbdump.db<br />
</code><br />
Execute the following command on mysql to let the slave know where the master is and how to access it.  This is also where you&#8217;ll be using the FILE and POSITION you wrote down earlier when starting replication on the master.<br />
<code><br />
CHANGE MASTER TO MASTER_HOST='SERVER01', MASTER_USER='replusr', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=106;<br />
</code><br />
Stop the MySql server to exit safe mode.</p>
<p>Start the MySql server normally so the slave will start up and you&#8217;re done.</p>
<p>You can run the following command to check if the slave is up and running:<br />
<code><br />
show status like ‘Slave%’;<br />
</code><br />
You should see output like the following<br />
<code><br />
+----------------------------+-------+<br />
| Variable_name              | Value |<br />
+----------------------------+-------+<br />
| Slave_open_temp_tables     | 0     |<br />
| Slave_retried_transactions | 0     |<br />
| Slave_running              | ON    |<br />
+----------------------------+-------+<br />
3 rows in set (0.00 sec)<br />
</code><br />
Check that Slave_running is set to ON.<br />
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://vrsoftware.biz/set-up-simple-master-slave-replication-with-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Our experience</title>
		<link>http://vrsoftware.biz/our-experience/</link>
		<comments>http://vrsoftware.biz/our-experience/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 13:51:45 +0000</pubDate>
		<dc:creator><![CDATA[VR Software]]></dc:creator>
				<category><![CDATA[About Us]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery Mobile]]></category>
		<category><![CDATA[MS SQL]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[Sencha Touch]]></category>
		<category><![CDATA[WebSockets]]></category>

		<guid isPermaLink="false">http://vrsoftware.biz/?p=73</guid>
		<description><![CDATA[We have been develping software applications since 1996 when ASP was still a big thing. You&#8217;ll be glad to hear though that we&#8217;ve have moved along with the times towards newer languages like C# and ASP.NET and over the years<span class="ellipsis">&#8230;</span><div class="read-more"><a href="http://vrsoftware.biz/our-experience/">Read more &#8250;</a></div><!-- end of .read-more -->]]></description>
				<content:encoded><![CDATA[<p>We have been develping software applications since 1996 when ASP was still a big thing. You&#8217;ll be glad to hear though that we&#8217;ve have moved along with the times towards newer languages like C# and ASP.NET and over the years we&#8217;ve used the various versions of MS SQL database to store data in on the Windows platform.</p>
<p>We like open source a lot and have extensive experience with PHP as well as MySQL database. Other language we develop in are Java, Ruby and we&#8217;ve dabbled a bit in Python, but like any good developer we can adapt to different languages in a very short period of time.</p>
<p>As a lot of the applications we development as web-based, we are up to date with the latest web technology like HTML5, CSS3 and awesome new things like WebSockets. To speed up development we use libraries like jQuery and jQuery Mobile, or Sencha Touch if you prefer, and on the server side frameworks like Kohana and Spring take care of security as well.</p>
<p>To allow us fast turn-around times and good feedback to clients we&#8217;ve adapted methodologies like the agile methodology to deliver software that is not only of great quality, but also is exactly what the client needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://vrsoftware.biz/our-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
