    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>2skies.com :: Comparing mysql tables with mysqldump and diff</title>
        <link>http://2skies.com/docs/Comparing_mysql_tables_with_mysqldump_and_diff</link>
        <description>Hosting-Development-Support :: Experience the difference</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:support@2skies.com" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>

<!-- show a header for the current publication type -->
        <h2>library</h2>


<div class="xar-mod-head"><span class="xar-mod-title">web development and webmaster best practice + MySQL</span></div>

<table border="0" cellpadding="1" cellspacing="0">
<tr>
    <td valign="top">
        Browse in :
   </td>
   <td valign="top">

                                    <a href="http://2skies.com/docs/">All</a>

                 &gt;                     <a href="http://2skies.com/docs/c43/">Documentation</a>

                 &gt;                     <a href="http://2skies.com/docs/c68/">knowledge base</a>
<br />

                                    <a href="http://2skies.com/docs/">All</a>

                 &gt;                     <a href="http://2skies.com/docs/c71/">Subject</a>

                 &gt;                     <a href="http://2skies.com/docs/c73/">Software</a>

                 &gt;                     <a href="http://2skies.com/docs/c86/">MySQL</a>
<br />

                                    <a href="http://2skies.com/docs/c68-86/">Any of these categories</a>

                -                    <a href="http://2skies.com/docs/c68+86/">All of these categories</a>
<br />
</td>
</tr>
</table>






<div class="xar-alt-outline xar-fullwidth">
    <div class="xar-accent-outline xar-fullwidth">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
            <tr>
                <td align="left" valign="top" class="xar-normal">
                    <span class="xar-title"> Comparing mysql tables with mysqldump and diff</span>
                   <br />
                    <div align="right">
                        <span class="xar-sub">  </span>
                    </div>
                    <br />
                    <br />
                    <p>In this example, we'll export our databases to to text files. Note the &quot;--skip-opt&quot; argument, supplied here as MySQL 4.1 and higher enable the &quot;--opt&quot; options by default, resulting in smaller, faster files. Usually we want this but in this case we disable it so diff can compare line by line.</p>
<p>MySQL Commands:</p>
<pre class="xml">mysqldump -u username -p --skip-opt dbname1 xar_block_instances &gt; one.sql<br />mysqldump -u username -p --skip-opt dbname2 xar_block_instances &gt; two.sql<br /></pre>
<p>The diff command:</p>
<pre class="xml">diff -y --suppress-common-lines one.sql two.sql &gt; diff.txt<br /></pre>
<p>This command will compare the two files and output the differences to a file called diff.txt.</p>                    <br />
                    <span class="xar-quote">  </span>
</td>
           </tr>
       </table>
   </div>
</div>

<p>
Updated:  05 Apr 10 07:34</p>
<br />
   <table border="0" width="95%">
       <tr>
           <td align="left">
                    <a href="http://2skies.com/docs/basic_http_authentication_with_lighttpd">&lt;
 prev </a>
&nbsp;
           </td>
           <td align="right">
               &nbsp;
                    <a href="http://2skies.com/docs/Compressing_your_website_output">
 next &gt;</a>
</td>
       </tr>
   </table>
</channel>
</rss>
