<?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>Honolulu Hacker &#187; Mysql</title>
	<atom:link href="http://honoluluhacker.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://honoluluhacker.com</link>
	<description>Tech, Linux, Rails by Honululu-based Kevin English</description>
	<lastBuildDate>Sat, 24 Sep 2011 22:53:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Example SQL Report with the Ruby Spreadsheet Gem</title>
		<link>http://honoluluhacker.com/2009/06/17/example-sql-report-with-the-ruby-spreadsheet-gem/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=example-sql-report-with-the-ruby-spreadsheet-gem</link>
		<comments>http://honoluluhacker.com/2009/06/17/example-sql-report-with-the-ruby-spreadsheet-gem/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 20:44:49 +0000</pubDate>
		<dc:creator>kenglish</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ruby spreadsheet]]></category>

		<guid isPermaLink="false">http://honoluluhacker.com/?p=694</guid>
		<description><![CDATA[If you want to create a Excel reports for your users, this can be done rather easily in Ruby using the Spreadsheet Gem. def spreadsheet_report&#40;excel_filename, worksheet_name, column_order, result&#41; book = Spreadsheet::Workbook.new sheet1 = book.create_worksheet :name =&#62; worksheet_name &#160; rownum = 0 for column in column_order sheet1.row&#40;rownum&#41;.push column end for row in result rownum += 1 [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to create a Excel reports for your users, this can be done rather easily in Ruby using the <a href="http://rubyforge.org/projects/spreadsheet">Spreadsheet Gem</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">def</span> spreadsheet_report<span style="color:#006600; font-weight:bold;">&#40;</span>excel_filename, worksheet_name, 
                       column_order, result<span style="color:#006600; font-weight:bold;">&#41;</span>
    book = <span style="color:#6666ff; font-weight:bold;">Spreadsheet::Workbook</span>.<span style="color:#9900CC;">new</span>
    sheet1 = book.<span style="color:#9900CC;">create_worksheet</span> <span style="color:#ff3333; font-weight:bold;">:name</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> worksheet_name
&nbsp;
    rownum = <span style="color:#006666;">0</span>
    <span style="color:#9966CC; font-weight:bold;">for</span> column <span style="color:#9966CC; font-weight:bold;">in</span> column_order
      sheet1.<span style="color:#9900CC;">row</span><span style="color:#006600; font-weight:bold;">&#40;</span>rownum<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">push</span> column
    <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">for</span> row <span style="color:#9966CC; font-weight:bold;">in</span> result
      rownum <span style="color:#006600; font-weight:bold;">+</span>= <span style="color:#006666;">1</span>
      <span style="color:#9966CC; font-weight:bold;">for</span> column <span style="color:#9966CC; font-weight:bold;">in</span> column_order
        sheet1.<span style="color:#9900CC;">row</span><span style="color:#006600; font-weight:bold;">&#40;</span>rownum<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">push</span> row<span style="color:#006600; font-weight:bold;">&#91;</span>column<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>? ? <span style="color:#996600;">'N/A'</span> : row<span style="color:#006600; font-weight:bold;">&#91;</span>column<span style="color:#006600; font-weight:bold;">&#93;</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    book.<span style="color:#9900CC;">write</span> <span style="color:#996600;">&quot;#{excel_filename}.xls&quot;</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Here&#8217;s what the code would like in your rake task</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">column_order = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;Name&quot;</span>, <span style="color:#996600;">&quot;DOB&quot;</span>, <span style="color:#996600;">&quot;Rank&quot;</span>,<span style="color:#996600;">&quot;Hire Date&quot;</span>, 
                <span style="color:#996600;">&quot;Height&quot;</span>, <span style="color:#996600;">&quot;Weight&quot;</span> <span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
sql =<span style="color:#006600; font-weight:bold;">&lt;&lt;-</span><span style="color:#9966CC; font-weight:bold;">END</span>
  <span style="color:#CC0066; font-weight:bold;">SELECT</span> name AS Name,
   date_of_birth AS DOB, 
   rank AS Rank,
   hire_date Hire <span style="color:#CC00FF; font-weight:bold;">Date</span>,
   height AS Height,
   weight AS  Weight
  FROM fire_fighters
  ORDER BY name
<span style="color:#9966CC; font-weight:bold;">END</span>
&nbsp;
conn  = <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>.<span style="color:#9900CC;">connection</span>
result    = conn.<span style="color:#9900CC;">select_all</span><span style="color:#006600; font-weight:bold;">&#40;</span>sql<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
excel_filename = <span style="color:#996600;">&quot;FireFighterReport#{Time.year}&quot;</span> 
worksheet_name = <span style="color:#996600;">&quot;FireFighter Report #{Time.year}&quot;</span>
spreadsheet_report<span style="color:#006600; font-weight:bold;">&#40;</span>excel_filename, worksheet_name, 
                   column_order, result<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Now, that&#8217;s easy!</p>
<p><a href="http://spreadsheet.rubyforge.org/">Ruby Spreadsheet Gem  Documentation</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2009/06/17/example-sql-report-with-the-ruby-spreadsheet-gem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>svn2git for real men</title>
		<link>http://honoluluhacker.com/2009/05/21/svn2git-for-real-men/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=svn2git-for-real-men</link>
		<comments>http://honoluluhacker.com/2009/05/21/svn2git-for-real-men/#comments</comments>
		<pubDate>Thu, 21 May 2009 21:43:20 +0000</pubDate>
		<dc:creator>kenglish</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://honoluluhacker.com/?p=675</guid>
		<description><![CDATA[On the server, set up the remote repositories: 1 2 3 mkdir project1.git cd project1.git git --bare init Here&#8217;s a script to do them all in one shot, just modifiy the REPOS variable: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #!/bin/sh &#160; REPOS=&#34;project1 project2 project3 project4&#34; &#160; for [...]]]></description>
			<content:encoded><![CDATA[<p>On the server, set up the remote repositories:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> project1.git
<span style="color: #7a0874; font-weight: bold;">cd</span> project1.git
<span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> init</pre></td></tr></table></div>

<p>Here&#8217;s a script to do them all in one shot, just modifiy the REPOS variable:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">REPOS</span>=<span style="color: #ff0000;">&quot;project1 project2 project3 project4&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> repo <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$REPOS</span>
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #007800;">repo_dir</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$repo</span>.git&quot;</span>
    <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> <span style="color: #007800;">$repo_dir</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Creating git directory  <span style="color: #007800;">$repo_dir</span>&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$repo_dir</span>
    <span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> init
    <span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></td></tr></table></div>

<p>Now, on the workstation:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> git-core <span style="color: #c20cb9; font-weight: bold;">git-svn</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> nirvdrum-svn2git <span style="color: #660033;">--source</span> http:<span style="color: #000000; font-weight: bold;">//</span>gems.github.com</pre></td></tr></table></div>

<p>Create the authors.txt in the following format:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">dburger = David Burger <span style="color: #000000; font-weight: bold;">&lt;</span>email<span style="color: #000000; font-weight: bold;">@</span>email.com<span style="color: #000000; font-weight: bold;">&gt;</span>
jdoe = John Doe <span style="color: #000000; font-weight: bold;">&lt;</span>jdoe<span style="color: #000000; font-weight: bold;">@</span>doe.com<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>

<p>For one project, do the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> project1
<span style="color: #7a0874; font-weight: bold;">cd</span> project1
svn2git  https:<span style="color: #000000; font-weight: bold;">//</span>svn.myserver.org<span style="color: #000000; font-weight: bold;">/</span>repos<span style="color: #000000; font-weight: bold;">/</span>ses <span style="color: #660033;">--authors</span> ..<span style="color: #000000; font-weight: bold;">/</span>authors.txt
<span style="color: #c20cb9; font-weight: bold;">git</span> remote add origin hailstorm.myserver.org:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>kenglish<span style="color: #000000; font-weight: bold;">/</span>repotest<span style="color: #000000; font-weight: bold;">/</span>ses.git
<span style="color: #c20cb9; font-weight: bold;">git</span> push <span style="color: #660033;">--all</span></pre></td></tr></table></div>

<p>The script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
&nbsp;
<span style="color: #007800;">REPOS</span>=<span style="color: #ff0000;">&quot;project1 project2 project3 project4&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> repo <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$REPOS</span>
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #007800;">$repo</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$repo</span>
&nbsp;
    <span style="color: #007800;">cmd</span>=<span style="color: #ff0000;">&quot;svn2git https://svn.myserver.org/repos/<span style="color: #007800;">$repo</span> --authors ../authors.txt&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$cmd</span>
    <span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$cmd</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #007800;">cmd</span>=<span style="color: #ff0000;">&quot;git remote add origin hailstorm.myserver.org:/home/kenglish/repotest/<span style="color: #007800;">$repo</span>.git&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$cmd</span>
    <span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$cmd</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #007800;">cmd</span>=<span style="color: #ff0000;">&quot;git push --all&quot;</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$cmd</span>
    <span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$cmd</span><span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #7a0874; font-weight: bold;">cd</span> ..
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;DONE EXPORTING <span style="color: #007800;">$repo</span>&quot;</span> 
<span style="color: #000000; font-weight: bold;">done</span>
<span style="color: #7a0874; font-weight: bold;">exit</span></pre></td></tr></table></div>

<p>Don&#8217;t diss the shell script, I leave in the echoes in case i need to test stuff out&#8230;</p>
<p>Note: Another option for the authors file is place it in your home directory .svn2git/authors (e.g. /home/kenglish/.svn2git/authors). Svn2git will automatically detect it and use it.<br />
Any questions? Comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2009/05/21/svn2git-for-real-men/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP/Mysql on Ubuntu 7.04</title>
		<link>http://honoluluhacker.com/2007/08/31/phpmysql-on-ubuntu-704/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phpmysql-on-ubuntu-704</link>
		<comments>http://honoluluhacker.com/2007/08/31/phpmysql-on-ubuntu-704/#comments</comments>
		<pubDate>Sat, 01 Sep 2007 02:20:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://kenglish77.net/surfblog/index.php?entry=entry070831-162050</guid>
		<description><![CDATA[On Ubuntu 7.04 (Feisty Fawn), mysql_connect and all those leftover functions from php3/php4 do not work. YOu have to go into /etc/php5/apache2/php.ini and add the .so file. Do this: sudo vi /etc/php5/apache2/php.ini Add: extensions = mysql.so Make sure to restart apache: sudo /etc/init.d/apache2 restart]]></description>
			<content:encoded><![CDATA[<p>On Ubuntu 7.04 (Feisty Fawn), mysql_connect and all those leftover functions from php3/php4 do not work. YOu have to go into  /etc/php5/apache2/php.ini and add the .so file. Do this:</p>
<p>sudo vi /etc/php5/apache2/php.ini</p>
<p>Add: </p>
<p>extensions = mysql.so</p>
<p>Make sure to restart apache:</p>
<p>sudo /etc/init.d/apache2 restart</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2007/08/31/phpmysql-on-ubuntu-704/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpmyadmin login cookie timeout</title>
		<link>http://honoluluhacker.com/2007/08/09/phpmyadmin-login-cookie-timeout/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phpmyadmin-login-cookie-timeout</link>
		<comments>http://honoluluhacker.com/2007/08/09/phpmyadmin-login-cookie-timeout/#comments</comments>
		<pubDate>Thu, 09 Aug 2007 23:37:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://kenglish77.net/surfblog/index.php?entry=entry070809-133740</guid>
		<description><![CDATA[If you are working on your local box, phpmyadmin will expire the session every 1800 seconds which is 30 minutes. sometimes that just too soon, so you can hack it by change the value of $cfg[&#039;LoginCookieValidity&#039;] in /usr/share/phpmyadmin/libraries/config.default.php i usually set it to 18000&#8230; $cfg[&#039;LoginCookieValidity&#039;] = 18000; // validity of cookie login // (in seconds) [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working on your local box, phpmyadmin will expire the session every 1800 seconds which is 30 minutes. sometimes that just too soon, so you can hack it by change the value of $cfg[&#039;LoginCookieValidity&#039;] in /usr/share/phpmyadmin/libraries/config.default.php</p>
<p>i usually set it to 18000&#8230;</p>
<p>$cfg[&#039;LoginCookieValidity&#039;]     = 18000; // validity of cookie login  <br />                                         // (in seconds)</p>
<p>I usually set this and forget it but it always takes me like 4-5 minutes to FTFSC and find where to set it again..</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2007/08/09/phpmyadmin-login-cookie-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TRUNCATE ALL Tables</title>
		<link>http://honoluluhacker.com/2007/08/03/truncate-all-tables/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=truncate-all-tables</link>
		<comments>http://honoluluhacker.com/2007/08/03/truncate-all-tables/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 23:20:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://kenglish77.net/surfblog/index.php?entry=entry070803-132002</guid>
		<description><![CDATA[USE AT YOUR OWN RISK. Put this in a script, mysqltrunc.sh then run it&#8230;.it will truncate all the data in all of your table #!/usr/bin/env bash# Written by David Burger if [ $# -eq 2 ]; then user=$1 dbname=$2 basecmd=&#8221;mysql -u ${user} -D ${dbname}&#8221;elif [ $# -eq 3 ]; then user=$1 PASS=$2 dbname=$3 basecmd=&#8221;mysql -u [...]]]></description>
			<content:encoded><![CDATA[<p>USE AT YOUR OWN RISK. Put this in a script, mysqltrunc.sh then run it&#8230;.it will truncate all the data in all of your table</p>
<p>#!/usr/bin/env bash<br /># Written by David Burger</p>
<p>if [ $# -eq 2 ]; then<br />  user=$1<br />  dbname=$2<br />  basecmd=&#8221;mysql -u ${user} -D ${dbname}&#8221;<br />elif [ $# -eq 3 ]; then<br />  user=$1<br />  PASS=$2<br />  dbname=$3<br />  basecmd=&#8221;mysql -u ${user} -p$PASS -D ${dbname}&#8221;<br />else<br />  echo &#8220;usage: mysqltrunc user [pass] database&#8221; >&#038;2<br />  exit 1<br />fi</p>
<p>tables=$(${basecmd} -e &#8220;SHOW TABLES;&#8221; | grep -v &#8220;+&#8211;&#8221; | grep -v &#8220;Tables_in_${dbname}&#8221;)<br />if [ $? -ne 0 ]; then<br />  echo &#8220;Unable to retrieve the table names.&#8221; >&#038;2<br />  exit 1<br />fi</p>
<p>cmd=&#8221;"</p>
<p>for table in ${tables}; do<br />  cmd=&#8221;${cmd} TRUNCATE ${table};&#8221;<br />done</p>
<p>$(${basecmd} -e &#8220;${cmd}&#8221;)</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2007/08/03/truncate-all-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql Dump</title>
		<link>http://honoluluhacker.com/2007/06/09/mysql-dump/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-dump</link>
		<comments>http://honoluluhacker.com/2007/06/09/mysql-dump/#comments</comments>
		<pubDate>Sat, 09 Jun 2007 12:12:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://kenglish77.net/surfblog/index.php?entry=entry070609-051236</guid>
		<description><![CDATA[I have a love/hate with this program. Here are so notes so I don&#039;t have to keep looking it up&#8230; Creates all the tables with the data but don&#039;t add the &#8220;drop database&#8221; statements. Good for if you are going to get a dump so you can restart a replication that&#039;s died: mysqldump -umyuser -pmypasswrd [...]]]></description>
			<content:encoded><![CDATA[<p>I have a love/hate with this program. Here are so notes so I don&#039;t have to keep looking it up&#8230;</p>
<p>Creates all the tables with the data but don&#039;t add the &#8220;drop database&#8221; statements. Good for if you are going to get a dump so you can restart a replication that&#039;s died:</p>
<p>mysqldump -umyuser -pmypasswrd -h localhost &#8211;add-drop-table &#8211;no-create-db  &#8211;quick &#8211;databases &#8211;extended-insert db1 db2 db3</p>
<p>Sometimes, you many want to do this in 2 stages</p>
<p>Dump structure only:<br />mysqldump -umyuser -pmypasswrd -h localhost &#8211;add-drop-table &#8211;no-data &#8211;no-create-db  </p>
<p>Dump data:<br />mysqldump -umyuser -pmypasswrd -h localhost &#8211;quick &#8211;extended-insert &#8211;no-create-db  &#8211;no-create-info  </p>
<p>mysqldump -usps -p sps_development &#8211;quick &#8211;extended-insert &#8211;no-create-db  &#8211;no-create-info</p>
]]></content:encoded>
			<wfw:commentRss>http://honoluluhacker.com/2007/06/09/mysql-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

