<?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>GSaraiva&#039;s Projects &#187; MySQLDump</title>
	<atom:link href="http://projects.pro.br/gsaraiva/tag/mysqldump/feed/" rel="self" type="application/rss+xml" />
	<link>http://projects.pro.br/gsaraiva</link>
	<description>Step by step</description>
	<lastBuildDate>Tue, 01 Sep 2009 13:14:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL: Database Dump tricks</title>
		<link>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-tricks/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-tricks/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 17:56:30 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[MySQLDump]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=195</guid>
		<description><![CDATA[Folks,
Let me relate this:
Sometimes when you are dumping a database to another host your connection can down, and you will lost all your job and start again? No, no, no, you can make some tricks to continue where you stopped.
So let me enumarate the tricks:

MySQLDump commands:
Use &#8211;add-drop-table
For don&#8217;t lose what you already done, you can [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>Let me relate this:</p>
<p>Sometimes when you are dumping a database to another host your connection can down, and you will lost all your job and start again? No, no, no, you can make some tricks to continue where you stopped.</p>
<p>So let me enumarate the tricks:
<dl>
<h4>MySQLDump commands:</h4>
<li><strong>Use &#8211;add-drop-table</strong><br />
For don&#8217;t lose what you already done, you can config dump to don&#8217;t drop the table you are transfering.<br />
Command: <!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li>--add-drop-table=FALSE</li></ol></div></pre><!--END_DEVFMTCODE-->
</li>
<li><strong>Use &#8211;no-create-info</strong><br />
To avoid the creation of the table, you need to set this option as true.<br />
Command: <!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li>--no-create-info=TRUE</li></ol></div></pre><!--END_DEVFMTCODE-->
</li>
<li><strong>Use &#8211;where option</strong><br />
the &#8211;where option will work as a SQL filter for you, so if you have a indexed table you can<br />
Command: <!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li>--where=&quot;ID &gt; <span style="color: #cc66cc;">300</span>&quot;</li></ol></div></pre><!--END_DEVFMTCODE-->
</li>
<h4>MySQL commands:</h4>
<li><strong>Use &#8211;force</strong><br />
To avoid a break on the processing if the dump post a SQL that can cause a error, you need to Force to MySQL continue even with a SQL error and it will keep the rest of the process working.<br />
Command: <!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li>--force</li></ol></div></pre><!--END_DEVFMTCODE-->
</li>
</dl>
<p>So, now you know what the commands do and can create a full command line like this one:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li></li><li>C:\MySQL\Bin&gt;mysqldump -h 10.0.0.1 -u root -p123456 --add-drop-table=FALSE --no-create-info=TRUE --where=&quot;ID &gt; 300&quot; MyDatabase MyTable | mysql -h www.mysite.com -u MyWebUser -p123456 --force MyWebDatabase</li><li></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>Piece of cake, uhm?</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Database Dump to another Host</title>
		<link>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-to-another-host/</link>
		<comments>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-to-another-host/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 16:50:32 +0000</pubDate>
		<dc:creator>Gilberto Saraiva</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[MySQLDump]]></category>

		<guid isPermaLink="false">http://gsaraiva.projects.pro.br/?p=185</guid>
		<description><![CDATA[Folks,
I&#8217;m not a big fan of database programming, but sometimes we need to use then and sometimes we need to manipulate HUGE databases.
Today I&#8217;ve take a big problem, a MySQL database with ~4 GB of size to send to webserver on USA, I tryed to use SQLYog, but this one is to slow and don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Folks,</strong></p>
<p>I&#8217;m not a big fan of database programming, but sometimes we need to use then and sometimes we need to manipulate HUGE databases.</p>
<p>Today I&#8217;ve take a big problem, a MySQL database with ~4 GB of size to send to webserver on USA, I tryed to use SQLYog, but this one is to slow and don&#8217;t provide a way to retry o continue if some error raise. So 2 hours has pass, and I decided to learn a little about MySQL dump system, and for my luck the mysqldump executable make all the job for me, we need only pass the right command line.</p>
<p>Lets take a look on the possibilities:
<dl>
<li>MySQLDump is a application that provide a easy way to backup your table(s) or full database(s), keep this idea on the mind!</li>
<li>When we create a dump we can output the structure as a SQL file, normal or compressed one.</li>
<li>And after reading a little about the dump, I founded the glory magic of create a output to another host</li>
</dl>
<p>Let me show the glory magic of dump a database to another host:<br />
On a shell (DOS or other one):</p>
<dl>
<!--DEVFMTCODE--><pre class="devcodeblock" title="DOS"><div class="devcodeoverflow"><ol><li></li><li>C:\MySQL\Bin&gt;mysqldump -h 10.0.0.1 -u root -p123456 MyDatabase MyTable | mysql -h www.mysite.com -u MyWebUser -p123456 MyWebDatabase</li><li></li></ol></div></pre><!--END_DEVFMTCODE--><br />
Where:
<dl>
<li><strong>-h 10.0.0.1</strong>: -h param to indicate the host, the default is localhost, so if you are on the machine that have the database to copy, the use isn&#8217;t needed.</li>
<li><strong>-u root</strong>: -u param to indicate the mysql user.</li>
<li><strong>-p123456</strong>: -p param to indicate the mysql user password. <em>Note: the password is together the -p param without space between.</em></li>
<li><strong>MyDatabase MyTable</strong>: MyDatabase indicate the database name, and MyTable indicate the table name.</li>
<li><strong>| mysql</strong>: This param makes mysqldump use mysql command line as the output place.</li>
<li><strong>-h www.mysite.com</strong>: Indicate the host to mysql command line.</li>
<li><strong>-u MyWebUser</strong>: indicate the mysql user to mysql command line.</li>
<li><strong>-p123456</strong>: indicate the mysql user password to mysql command line.</li>
<li><strong>MyWebDatabase</strong>: indicate the database to be used by mysql command line.</li>
</dl>
<p>This is the simple way to get things working fast, you can advance with your knowlegdes by searching more on the web and reading the following pages:<br />
<a href="http://dev.mysql.com/doc/refman/5.0/en/upgrading-to-arch.html" target="_blank">http://dev.mysql.com/doc/refman/5.0/en/upgrading-to-arch.html</a><br />
<a href="http://www.tutorialspoint.com/mysql/mysql-database-export.htm" target="_blank">http://www.tutorialspoint.com/mysql/mysql-database-export.htm</a></p>
<p>Very good uhm?</p>
<p>Hugs for all</p>
]]></content:encoded>
			<wfw:commentRss>http://projects.pro.br/gsaraiva/2008/07/mysql-database-dump-to-another-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
