<?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>Open Source Web Thoughts &#187; mysql</title>
	<atom:link href="http://blog.dewaldbotha.co.za/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dewaldbotha.co.za</link>
	<description></description>
	<lastBuildDate>Fri, 25 Nov 2011 09:17:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>MySQL data dumps done right.</title>
		<link>http://blog.dewaldbotha.co.za/2009/04/08/mysql-data-dumps-done-right/</link>
		<comments>http://blog.dewaldbotha.co.za/2009/04/08/mysql-data-dumps-done-right/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 11:17:19 +0000</pubDate>
		<dc:creator>dewaldbotha</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[data only]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[procedures]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[triggers]]></category>

		<guid isPermaLink="false">http://blog.dewaldbotha.co.za/2009-04-08/mysql-data-dumps-done-right/</guid>
		<description><![CDATA[To dump data in MySQL command line is one of the easiest things to do.  All you have to do is follow these 3 easy steps in your linux command line: 1.  Dump the schema only.  This will  not contain any data, procedures or triggers, but only create info.  This will allow you to easily <a href="http://blog.dewaldbotha.co.za/2009/04/08/mysql-data-dumps-done-right/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>To dump data in MySQL command line is one of the easiest things to do.  All you have to do is follow these 3 easy steps in your linux command line:</p>
<p>1.  <strong>Dump the schema only</strong>.  This will  not contain any data, procedures or triggers, but only create info.  This will allow you to easily import your original schema later on.</p>
<pre lang="php">
mysqldump -uroot -proot -d --skip-triggers myDatabase > myDatabase_schema.sql</pre>
<p>The -u specifies your username, and must be followed by your username e.g. -uroot.  This is the same with your password, -proot.</p>
<p>The -d tells mysqldump to not dump any data in the schema and the &#8211;skip-triggers will skip all triggers and procedures.</p>
<p>The myDabase is the name of your database and the > myDatabase_schema.sql is where you want to dump it.</p>
<p>2.  <strong>Dump the triggers/procedures</strong>.  This will only contain the triggers and procedures contained within your database.</p>
<pre lang="php">
mysqldump -uroot -proot -d --no-create-info myDatabase > myDatabase_triggers_procs.sql</pre>
<p>Here we have a &#8211;no-create-info to tell mysqldump that no create statements must be allowed, thus eliminating any schema sql and again the -d parameter to skip all data.</p>
<p>3. <strong> Dump the data only</strong> without triggers and create statements.</p>
<pre lang="php">
mysqldump -uroot -proot --skip-triggers --no-create-info myDatabase > myDatabase_base_data.sql</pre>
<p>Finally we can dump the data only.  The &#8211;skip-triggers skips all triggers and procedures, whils the &#8211;no-create-info skips sql create statements.</p>
<p><strong>This will allow you to have 3 different sql files:</strong></p>
<ul>
<li>myDatabase_schema.sql (only contains the schema)</li>
<li>myDatabase_triggers_procs.sql (only contains triggers/procs)</li>
<li>myDatabase_base_data.sql (only contains data)</li>
</ul>
<h3>Now to import.</h3>
<p>This is fairly trivial.</p>
<p>All you have to remember is to <strong>import your data in a sequence</strong>.</p>
<p>First the schema, then the triggers and procedures and then finally the base data.  The schema will create your tables, the triggers and procs can then be added to your tables and finally the tables can be populated with data.</p>
<p><strong>1.  Import schema</strong></p>
<pre lang="php">
mysql -uroot -proot myDatabase < myDatabase_schema.sql</pre>
<p><strong>2.  Import triggers/procs</strong></p>
<pre lang="php">
mysql -uroot -proot myDatabase < myDatabase_triggers.sql</pre>
<p><strong>3.  Import base data</strong></p>
<pre lang="php">
mysql -uroot -proot myDatabase < myDatabase_base_data.sql</pre>
<p>And your done. <img src='http://blog.dewaldbotha.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dewaldbotha.co.za/2009/04/08/mysql-data-dumps-done-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lyme, a stack of scalability</title>
		<link>http://blog.dewaldbotha.co.za/2008/11/25/lyme-a-stack-of-scalability/</link>
		<comments>http://blog.dewaldbotha.co.za/2008/11/25/lyme-a-stack-of-scalability/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 13:13:43 +0000</pubDate>
		<dc:creator>dewaldbotha</dc:creator>
				<category><![CDATA[erlang]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[yaws]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[lyme]]></category>

		<guid isPermaLink="false">http://blog.dewaldbotha.co.za/2008-11-25/lyme-a-stack-of-scalability/</guid>
		<description><![CDATA[so last week i&#8217;ve been to a conference in good ol&#8217; silicon valley - a lot of focus on scalability and performance.  that being said &#8211; i&#8217;ve decided to be proactive and try out a stack i&#8217;m totally unfamiliar with, but apparently with great potential. lyme &#8211; linux, yaws, mysql, erlang linux - the tried <a href="http://blog.dewaldbotha.co.za/2008/11/25/lyme-a-stack-of-scalability/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>so last week i&#8217;ve been to a conference in good ol&#8217; silicon valley -</p>
<p>a lot of focus on scalability and performance.  that being said &#8211; i&#8217;ve decided to be proactive and try out a stack i&#8217;m totally unfamiliar with, but apparently with great potential.</p>
<h3><strong>lyme</strong> &#8211; linux, yaws, mysql, erlang</h3>
<p><strong><a href="http://www.linux.org/" title="Linux" target="_blank">linux</a> </strong>- the tried and tested platform, open-source, and where all good things start.</p>
<p><strong><a href="http://yaws.hyber.org/" title="yaws" target="_blank">yaws</a> </strong>- <strong>y</strong>et <strong>a</strong>nother <strong>w</strong>eb <strong>s</strong>erver written in erlang, supposedly <a href="http://www.sics.se/~joe/apachevsyaws.html" title="performance test" target="_blank">outperforms apache with throughput and parallel sessions</a>.</p>
<p><a href="http://www.mysql.com/" title="mysql" target="_blank"><strong>mysql</strong></a> &#8211; i&#8217;m just a big fan, what can i say</p>
<p><strong><a href="http://www.erlang.org/" title="erlang" target="_blank">erlang</a> </strong>-  the language, created as a general purpose, concurrent language</p>
<p>so finally i got my <strong>lyme</strong> stack running on my machine &#8211; so now for the tedious process of evaluating it, and maybe do something like a simple user-to-user subscription service.  like the friends features of facebook <img src='http://blog.dewaldbotha.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>i&#8217;ll keep you informed with my findings, with a couple of code examples and a walkthrough of my experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dewaldbotha.co.za/2008/11/25/lyme-a-stack-of-scalability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

