<?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>databasically // Kansas City Small Business IT &#38;&#38; Ruby on Rails Programming &#187; Blog</title>
	<atom:link href="http://databasically.com/category/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://databasically.com</link>
	<description>Kansas City Small Business IT</description>
	<lastBuildDate>Fri, 03 Feb 2012 05:24:07 +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>Using aliases to forward incoming mail on Ubuntu</title>
		<link>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/</link>
		<comments>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 08:13:26 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=635</guid>
		<description><![CDATA[I only need to do this every couple years when I renew an SSL certificate and they want to verify domain ownership by sending to some non-standard address like ssladmin@example.com. So, here&#8217;s how: Edit the virtual alias file: (sudo) vi /etc/postfix/virtual Add your alias and the address(es) it forwards to: ssladmin@example.com realemail@example.com contact@example.com sales@gmail.com,support@gmail.com Reload [...]]]></description>
			<content:encoded><![CDATA[<p>I only need to do this every couple years when I renew an SSL certificate and they want to verify domain ownership by sending to some non-standard address like <code>ssladmin@example.com</code>.</p>
<p>So, here&#8217;s how:</p>
<p>Edit the virtual alias file:</p>
<pre name="code" class="ruby">
(sudo) vi /etc/postfix/virtual
</pre>
<p>Add your alias and the address(es) it forwards to:</p>
<pre name="code" class="ruby">
ssladmin@example.com   realemail@example.com
contact@example.com    sales@gmail.com,support@gmail.com
</pre>
<p>Reload the postfix virtual table:</p>
<pre name="code" class="ruby">
postmap /etc/postfix/virtual
</pre>
<p>Also make sure you have following line in /etc/postfix/main.cf file:</p>
<pre name="code" class="ruby">
virtual_alias_maps = hash:/etc/postfix/virtual
</pre>
<p>If you didn&#8217;t have that and you just added it, reload all of postfix:</p>
<pre name="code" class="ruby">
service postfix reload
</pre>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2012/01/25/using-aliases-to-forward-incoming-mail-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report</title>
		<link>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/</link>
		<comments>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 03:51:27 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=627</guid>
		<description><![CDATA[I got a few comments on the original post (Hide zero balance clients in Harvest Uninvoiced Report) about not suppressing projects that have a zero balance if the overall client has some billing. For instance, this report with some $0 projects and some $0 clients. The previous bookmarklet would only hide the clients with a [...]]]></description>
			<content:encoded><![CDATA[<p>I got a few comments on the <a href="http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/" title="Hide zero balance clients in Harvest Uninvoiced Report">original post</a> (<a href="http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/">Hide zero balance clients in Harvest Uninvoiced Report</a>) about not suppressing projects that have a zero balance if the overall client has some billing.</p>
<p>For instance, this report with some $0 projects and some $0 clients.  The previous bookmarklet would only hide the clients with a total of $0, which could still leave a lot of cruft floating around:<br />
<img src="http://f.cl.ly/items/2L330v0s0m0W0n2q0S3A/harvest-lots-of-zeros.png" alt="Lots of zeros!" width="547" height="441" /></p>
<p>The new bookmarklet will reduce it down to this:<br />
<img src="http://f.cl.ly/items/1C37120f2h1u3c363822/harvest-no-zeros.png" alt="No more zeros!" width="548" height="88" /></p>
<p>Here&#8217;s the actual code:<br />
<script src="https://gist.github.com/1484362.js?file=gistfile1.js"></script></p>
<p>And here&#8217;s a bookmarklet to drag to your browser bookmark bar:<br />
<a href="javascript:$$('tbody%20.btn-disabled').each(function(element,index){element.up('tbody').hide()});$$('td.ur-name%20a.gray').each(function(element,index){element.up('tr').hide()});void(0);">Harvest Hide Uninvoiced</a></p>
<p>Note: this is very dependent on the implementation of the Harvest report, so if this breaks in the future, you should <a href="http://twiter.com/wesgarrison">ping me on twitter</a> to let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hide zero balance clients in Harvest Uninvoiced Report</title>
		<link>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/</link>
		<comments>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 04:42:01 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=613</guid>
		<description><![CDATA[UPDATE: Check out the updated bookmarklet for more functionality: Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report I love the Harvest Uninvoiced Report. I actually built the same thing for myself using the Harvest API, so I could run it at will and see what client balances were. The Harvest provided one goes [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> Check out the updated bookmarklet for more functionality:<br />
<a href="http://databasically.com/2011/12/16/even-better-hiding-zero-balance-clientsprojects-in-harvest-uninvoiced-report/" title="Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report">Even better: hiding zero balance clients/projects in Harvest Uninvoiced Report</a></p>
<hr />
<p>I love the Harvest <a href="http://www.getharvest.com/blog/2011/05/the-uninvoiced-report-for-time-expenses/">Uninvoiced Report</a>. I actually built the same thing for myself using the Harvest API, so I could run it at will and see what client balances were.</p>
<p>The Harvest provided one goes a couple steps further, showing expenses and giving a link to create an invoice.</p>
<p>One thing, though:</p>
<p><img src="http://f.cl.ly/items/2c1j033w3j0z1W3d1T0r/harvest-uninvoiced.png" alt="harvest uninvoiced" height="322" width="584" /></p>
<p>We have a lot of clients and there might be a while that we don&#8217;t do something for someone. Showing all of these clients that don&#8217;t have a balance makes it hard to focus on the ones that <strong>do</strong> have a balance. This is the &#8216;Uninvoiced&#8217; report, after all, which I tend to use for &#8220;who do I need to invoice?&#8221;</p>
<p>Digging in, we can use some javascript to find the rows that are non-invoice-able and hide them:<br />
<script src="https://gist.github.com/1205514.js"> </script></p>
<p>Here&#8217;s a bookmarklet for you:<br />
<a href="javascript:$$('tbody%20.btn-disabled').each(function(element,%20index)%20{%20element.up('tbody').hide()%20});void(0);">Harvest Hide Uninvoiceable</a></p>
<p>Drag it to your bookmarks bar, go to the uninvoiced report, and click to hide.</p>
<p>Questions and improvements welcome, best way to get ahold of me is to <a href="http://twitter.com/wesgarrison">follow me on Twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/09/09/hide-zero-balance-clients-in-harvest-uninvoiced-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use vim to remove ^M end of line characters</title>
		<link>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/</link>
		<comments>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 08:48:47 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=603</guid>
		<description><![CDATA[Sometimes, when you open a file in vim, the end-of-line (EOL) characters are messed up. You&#8217;ll especially see this if you move a file from Windows to Unix.  You&#8217;ll see a ^M at the end of each line. How do you remove all of these ^M characters from vim? :%s/^M//g The most difficult part of [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, when you open a file in vim, the end-of-line (EOL) characters are messed up. You&#8217;ll especially see this if you move a file from Windows to Unix.  You&#8217;ll see a ^M at the end of each line.</p>
<p>How do you remove all of these ^M characters from vim?</p>
<pre name="code" class="ruby">:%s/^M//g</pre>
<p>The most difficult part of this is entering the control character.  You type ^V to get that, making the actual keys you press this:</p>
<pre name="code" class="ruby">:%s/&lt;control&gt;V&lt;control&gt;M//g</pre>
<p>Breaking it down:</p>
<ul>
<li><code>:%s</code> &#8211; search and replace using regular expressions</li>
<li><code>^M</code> &#8211; the control V &#8211; control M characters</li>
<li><code>g</code> &#8211; global replace, ie replace all</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/08/31/use-vim-to-remove-control-m-end-of-line-characters/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using SQL to delete rows from a table using INNER JOIN to another table</title>
		<link>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/</link>
		<comments>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 03:22:45 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=592</guid>
		<description><![CDATA[Oftentimes, one wants to delete some records from a table based on criteria in another table. How do you delete from one of those tables without removing the records in both table? DELETE DeletingFromTable FROM DeletingFromTable INNER JOIN CriteriaTable ON DeletingFromTable.field_id = CriteriaTable.id WHERE CriteriaTable.criteria = "value"; The key is that you specify the name [...]]]></description>
			<content:encoded><![CDATA[<p>Oftentimes, one wants to delete some records from a table based on criteria in another table. How do you delete from one of those tables without removing the records in both table?</p>
<pre class="ruby" name="code">DELETE DeletingFromTable
 FROM DeletingFromTable INNER JOIN CriteriaTable
 ON DeletingFromTable.field_id = CriteriaTable.id
 WHERE CriteriaTable.criteria = "value";</pre>
<p>The key is that you specify <strong>the name of the table to be deleted</strong> from as the <strong>SELECT</strong>. So, the JOIN and WHERE do the selection and limiting, while the DELETE does the deleting.</p>
<p>You&#8217;re not limited to just one table, though. If you have a many-to-many relationship (for instance, Magazines and Subscribers, joined by a Subscription) and you&#8217;re removing a Subscriber, you need to remove any potential records from the join model as well.</p>
<pre class="ruby" name="code">
DELETE subscribers, subscriptions
 FROM subscribers INNER JOIN subscriptions
   ON subscribers.id = subscriptions.subscriber_id
 INNER JOIN magazines
   ON subscriptions.magazine_id = magazines.id
 WHERE subscribers.name='Wes';
</pre>
<p>Deleting records with a join could also be done with a LEFT JOIN and a WHERE to see if the joined table was NULL, so that you could remove records in one table that didn&#8217;t have a match (like in preparation for adding a relationship.)  Example post to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/08/31/using-sql-to-delete-rows-from-a-table-using-inner-join/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuration for mailjet email delivery with Ruby on Rails</title>
		<link>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/</link>
		<comments>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 10:00:03 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=583</guid>
		<description><![CDATA[Setting up mailjet.com to deliver your mail via Ruby on Rails? Here&#8217;s how, because their Getting Started is nothing but placeholder headers right now. Create an account Go to https://www.mailjet.com and create an account. Note: the word &#8220;Faculatative&#8221; means &#8220;optional&#8221; on the signup form. Add your sending address Add a sending address (Accounts > Sender [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up mailjet.com to deliver your mail via Ruby on Rails?  Here&#8217;s how, because their <a href="https://www.mailjet.com/docs/getting_started">Getting Started</a> is nothing but placeholder headers right now.</p>
<div class="thumbnail"><a href="https://skitch.com/wesg/fdkc8/mailjet-real-time-emailing-mailjet.com"><img src="https://img.skitch.com/20110607-bmbfb3f4pjrcawsya4yab9dcic.preview.jpg" alt="Mailjet : Real-time Emailing - mailjet.com" /></a></div>
</p>
<p><span id="more-583"></span><br />
<h2>Create an account</h2>
<p>Go to <a href="https://www.mailjet.com">https://www.mailjet.com</a> and create an account.</p>
<p>Note: the word &#8220;Faculatative&#8221; means &#8220;optional&#8221; on the signup form.</p>
<h2>Add your sending address</h2>
<ul>
<li>Add a sending address (Accounts > <a href="https://www.mailjet.com/account/sender">Sender Addresses</a>)</li>
<li>Update your Rails ActionMailer configuration
<ul>
<li>Find the settings you need at: <a href="https://www.mailjet.com/account/setup">https://www.mailjet.com/account/setup</a></p>
<pre>
    SMTP server:
    in.mailjet.com

    Username (API Key):
    12345678901234567890

    Password (Secret Key):
    99999999999999999999999999999999

    Port:
    25 or 587 (some providers block port 25)

    Use TLS:
    yes
  </pre>
</li>
<li>Set these settings in config/application.rb (or config/environments/production.rb):
<pre name="code" class="ruby">

    config.action_mailer.raise_delivery_errors = false
    config.action_mailer.perform_deliveries = true

    config.action_mailer.smtp_settings = {
      :address => "in.mailjet.com",
      :enable_starttls_auto => true,
      :port => 587,
      :authentication => 'plain',
      :user_name => "12345678901234567890",
      :password => "99999999999999999999999999999999"
    }
</pre>
</li>
</ul>
</li>
</ul>
<h2>Setup domain authentication (SPF and/or DomainKeys/DKIM)</h2>
<h3>SPF</h3>
<p>
  <img src="https://img.skitch.com/20110607-nmn91j4ukdp8yna3pup3qu1sb8.png" alt="My Account - mailjet.com" /><br />
  Click <b>Domain DNS and SMTP setup</b>.<br />
  Then, under <b>Domain Authentication</b>, click your domain.
</p>
<p>Setting up SPF requires adding a DNS entry. Mailjet will look at your existing one and give you the one to replace it with.<br />
  It&#8217;ll look something like: <br /><code>domainname.com.	IN TXT "v=spf1 include:spf.mailjet.com mx ~all"</code><br />
  In my DNS manager, I created a TXT record, gave it a name of &#8220;domainname.com.&#8221; and set the value to the <br /><code>'v=spf1 include:spf.mailjet.com mx ~all'</code> portion (without the quotes).  The full example they give you is for the DNS zone syntax, which you may or may not have.</p>
<p>  If you need help configuring this, <a href="/contact-us">we would be happy to help you</a>.</p>
<h3>DKIM</h3>
<p>
  This is similar, a TXT record that has a key that identifies your server so mail can be sent.  Same deal.
</p>
<h2>Test</h2>
<p>Deploy your changes and kick off something that sends a mailer.  We have a Notifier model that has a <code>test_email()</code> method that I just called from the console to push a test through.  I just went to the reports and saw it there.</p>
<p>All in all, the service seems a little rough around the edges, mostly due to it being a French company that could use a little work on the translations and some serious love on the support documentations.  Hope this helps you get started with Mailjet configuration!</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/07/configuration-for-mailjet-email-delivery-with-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove all those .DS_Store files</title>
		<link>http://databasically.com/2011/06/06/remove-all-those-ds_store-files/</link>
		<comments>http://databasically.com/2011/06/06/remove-all-those-ds_store-files/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 14:36:17 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=579</guid>
		<description><![CDATA[I don&#8217;t like committing .DS_Store files into my projects, so here&#8217;s an easy way to remove them: Run this from your project folder: # Recursively erase all .DS_Store files in this folder and below find . -name \.DS_Store -exec rm -v {} \; Also, you can prevent the DS_Store files from being created. Run this [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like committing .DS_Store files into my projects, so here&#8217;s an easy way to remove them:</p>
<p>Run this from your project folder:</p>
<pre name="code" class="ruby">
# Recursively erase all .DS_Store files in this folder and below
find . -name \.DS_Store -exec rm -v {} \;
</pre>
<p>Also, you can prevent the DS_Store files from being created.  Run this from the Terminal:</p>
<pre name="code" class="ruby">
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
</pre>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/06/remove-all-those-ds_store-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>git: merge a single commit</title>
		<link>http://databasically.com/2011/06/03/git-merge-a-single-commit/</link>
		<comments>http://databasically.com/2011/06/03/git-merge-a-single-commit/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 10:01:43 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=563</guid>
		<description><![CDATA[Sometimes, you have one commit you want to get into production, but it&#8217;s located after other changes that you&#8217;re not ready to merge in yet. How can you get that single git commit into a different branch? First, you have to know the SHA of the commit you want: git checkout branch-with-commit-on-it git log Highlight [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, you have one commit you want to get into production, but it&#8217;s located after other changes that you&#8217;re not ready to merge in yet.  How can you get that single git commit into a different branch?</p>
<p>First, you have to know the SHA of the commit you want:</p>
<pre class="ruby">  git checkout branch-with-commit-on-it
  git log</pre>
<p>Highlight and copy the SHA of the commit you want to grab.</p>
<pre class="ruby">  git checkout master

  # -n =&gt; don't commit, just merge changes so we can review and commit ourself
  git cherry-pick -n [The commit’s SHA-1 Hash]

  # review
  git diff –cached

  # commit if all is well
  git commit -a -m “merge SHA1 ..."</pre>
<p>If you&#8217;re feeling confident, you can skip the -n and merge the single commit in directly and save a minute.</p>
<p>Note, this isn&#8217;t a merge, so it&#8217;s possible you could have some conflicts down the road when you merge the original commit into this branch.  You&#8217;re creating a brand new commit object.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/03/git-merge-a-single-commit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X: find the program running on a port</title>
		<link>http://databasically.com/2011/06/02/mac-os-x-find-the-program-running-on-a-port/</link>
		<comments>http://databasically.com/2011/06/02/mac-os-x-find-the-program-running-on-a-port/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 10:01:55 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Sysadmin]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=560</guid>
		<description><![CDATA[Sometimes, there&#8217;s a program running on a port and you don&#8217;t know what it is. How do you find out? I find this happens when I start a webserver up to test something locally and then I forget about it. So, if I wanted to find out what was running on port 80: sudo lsof [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, there&#8217;s a program running on a port and you don&#8217;t know what it is.  How do you find out?</p>
<p><span id="more-560"></span></p>
<p>I find this happens when I start a webserver up to test something locally and then I forget about it.  So, if I wanted to find out what was running on port 80:</p>
<pre class="ruby">  sudo lsof -i :80 # checks port 80

  COMMAND   PID USER   FD   TYPE    DEVICE SIZE/OFF NODE NAME
  ruby    64888   wg    6u  IPv4 0x6ddd270      0t0  TCP *:gds_db (LISTEN)</pre>
<p>&nbsp;</p>
<p>This command shows a list of open files. The -i option checks for internet addresses with the colon symbol representing a port (instead of an actual IP address).  Note, I&#8217;ve only used this on Mac OS X.  I&#8217;m not sure if there&#8217;s an equivalent for *nix or if it&#8217;s available in some package.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/02/mac-os-x-find-the-program-running-on-a-port/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Converting mysql databases to UTF8</title>
		<link>http://databasically.com/2011/06/01/converting-mysql-databases-to-utf8/</link>
		<comments>http://databasically.com/2011/06/01/converting-mysql-databases-to-utf8/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 10:01:26 +0000</pubDate>
		<dc:creator>Wes</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://databasically.com/?p=553</guid>
		<description><![CDATA[UTF8 is the way to go when you&#8217;re creating a new database for an application, but how do you get your existing applications upgraded? We dump the database and then import it with the new character set so we can test things out: # Export your latin1 encoded database mysqldump --user=username --password=password --default-character-set=latin1 --compatible=mysql40 dbname [...]]]></description>
			<content:encoded><![CDATA[<p>UTF8 is the way to go when you&#8217;re creating a new database for an application, but how do you get your existing applications upgraded?</p>
<p><span id="more-553"></span></p>
<p>We dump the database and then import it with the new character set so we can test things out:</p>
<pre class="ruby"># Export your latin1 encoded database
mysqldump
    --user=username
    --password=password
    --default-character-set=latin1
    --compatible=mysql40 dbname
    &gt; dump.sql

# Import database as utf8
mysql
    --user=username
    --password=password
    --default-character-set=utf8
    dbname
    &lt; dump.sql</pre>
<p>Note: wrapped for your reading convenience; these should all be on one line if you&#8217;re typing them at the command line.</p>
]]></content:encoded>
			<wfw:commentRss>http://databasically.com/2011/06/01/converting-mysql-databases-to-utf8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

