<?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>programming with passion &#187; Database</title>
	<atom:link href="http://www.jasonrowland.com/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonrowland.com</link>
	<description>Learning Mac, Ruby, iPhone, BlackBerry, Android, WinMobile</description>
	<lastBuildDate>Fri, 30 Jul 2010 21:01:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MacPorts mysql with GUI tools</title>
		<link>http://www.jasonrowland.com/2010/02/macports-mysql-with-gui-tools/</link>
		<comments>http://www.jasonrowland.com/2010/02/macports-mysql-with-gui-tools/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 19:33:00 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=290</guid>
		<description><![CDATA[A friend had some problems installing MySql with MacPorts and asked me if I had problems installing it.  Our problems were totally unrelated but thinking back, I remembered I had problem with MySQL Query Browser.  I couldn&#8217;t get it to connect even though I could connect via the command line.  It turned out to just [...]]]></description>
			<content:encoded><![CDATA[<p>A friend had some problems installing MySql with MacPorts and asked me if I had problems installing it.  Our problems were totally unrelated but thinking back, I remembered I had problem with <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html">MySQL Query Browser</a>.  I couldn&#8217;t get it to connect even though I could connect via the command line.  It turned out to just have the wrong path for the socket file.</p>
<p><a href="http://www.jasonrowland.com/wp-content/uploads/2010/02/mysql.png"><img class="alignleft size-medium wp-image-291" src="http://www.jasonrowland.com/wp-content/uploads/2010/02/mysql-300x292.png" alt="" width="300" height="292" /></a></p>
<p>Click the triangle next to the &#8220;More Options&#8221; label on the connection string an change the &#8220;Connect Using Socket&#8221; field to the path of your socket file.</p>
<p>To determine where your socket file is, type:</p>
<pre>netstat -ln | grep mysql</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2010/02/macports-mysql-with-gui-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninstall MySQL on Mac</title>
		<link>http://www.jasonrowland.com/2009/12/uninstall-mysql-on-mac/</link>
		<comments>http://www.jasonrowland.com/2009/12/uninstall-mysql-on-mac/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 22:29:20 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=230</guid>
		<description><![CDATA[Somehow, I either forgot my password, or I did something to mess up my MySQL instance.  it is a development machine, so I don&#8217;t really care about the databases on it.  I just wanted to remove it completely from my machine.  I actually had two copies of mysql installed.  One from Mac Ports and the [...]]]></description>
			<content:encoded><![CDATA[<p>Somehow, I either forgot my password, or I did something to mess up my MySQL instance.  it is a development machine, so I don&#8217;t really care about the databases on it.  I just wanted to remove it completely from my machine.  I actually had two copies of mysql installed.  One from Mac Ports and the other was the package directly from MySQL for the Mac.<br />
I used the following commands to completely remove mysql from my system.</p>
<pre>sudo port uninstall mysql5-server
sudo port uninstall mysql5</pre>
<pre>sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*</pre>
<p>edit /etc/hostconfig and remove the line MYSQLCOM=-YES-</p>
<pre>rm -rf ~/Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*</pre>
<p>Thanks to <a href="http://akrabat.com/computing/uninstalling-mysql-on-mac-os-x-leopard/">Rob Allen</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/12/uninstall-mysql-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determine mysql socket</title>
		<link>http://www.jasonrowland.com/2009/12/determine-mysql-socket/</link>
		<comments>http://www.jasonrowland.com/2009/12/determine-mysql-socket/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 21:06:51 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=227</guid>
		<description><![CDATA[netstat -ln &#124; grep mysql
]]></description>
			<content:encoded><![CDATA[<pre>netstat -ln | grep mysql</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/12/determine-mysql-socket/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install MySql5 on Snow Leopard using MacPorts</title>
		<link>http://www.jasonrowland.com/2009/10/install-mysql5-on-snow-leopard-using-macports/</link>
		<comments>http://www.jasonrowland.com/2009/10/install-mysql5-on-snow-leopard-using-macports/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 22:57:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=141</guid>
		<description><![CDATA[Install MacPorts before you do anything.
Install MySQL5
sudo port install mysql5
sudo port install mysql5-server 
sudo -u mysql mysql_install_db5
Secure MySQL5
To secure your MySQL5 installation, you can either change the password manually like so:
/opt/local/lib/mysql5/bin/mysqladmin -u root password {new-password}
or on a production system, you can run the secure script and not only change the password, but remove anonymous access and [...]]]></description>
			<content:encoded><![CDATA[<p>Install <a href="http://www.macports.org/">MacPorts</a> before you do anything.</p>
<h2>Install MySQL5</h2>
<pre>sudo port install mysql5
sudo port install mysql5-server 
sudo -u mysql mysql_install_db5</pre>
<h2>Secure MySQL5</h2>
<p>To secure your MySQL5 installation, you can either change the password manually like so:</p>
<pre>/opt/local/lib/mysql5/bin/mysqladmin -u root password {new-password}</pre>
<p>or on a production system, you can run the secure script and not only change the password, but remove anonymous access and prevent remote root login.</p>
<pre>/opt/local/lib/mysql5/bin/mysql_secure_installation</pre>
<h2>To start the MySQL daemon, type:</h2>
<pre>sudo /opt/local/lib/mysql5/bin/mysqld_safe &amp;</pre>
<p>or to make sure MySQL5 is launched at startup every time:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist</div>
<pre>sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist</pre>
<h2>Create a symbolic link</h2>
<pre>sudo ln -s /opt/local/bin/mysql5 /opt/local/bin/mysql</pre>
<h2>Test the installation</h2>
<pre>mysql -u root -p</pre>
<p>It should prompt you for a password and you should see the &#8220;mysql&gt;&#8221; prompt</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/10/install-mysql5-on-snow-leopard-using-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login failed after restoring database on SQL Server 2008</title>
		<link>http://www.jasonrowland.com/2009/08/login-failed-after-restoring-database-on-sql-server-2008/</link>
		<comments>http://www.jasonrowland.com/2009/08/login-failed-after-restoring-database-on-sql-server-2008/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 04:13:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.jasonrowland.com/?p=107</guid>
		<description><![CDATA[After restoring a production database backup on SQL Server 2008, to my development machine, I got a &#8220;Login failed for user xyz&#8221;. The database user was not associated with a user and was marked as &#8220;Without login&#8221;. This happens when you do not have a login for the database user.  You can create that user [...]]]></description>
			<content:encoded><![CDATA[<p>After restoring a production database backup on SQL Server 2008, to my development machine, I got a &#8220;Login failed for user xyz&#8221;. The database user was not associated with a user and was marked as &#8220;Without login&#8221;. This happens when you do not have a login for the database user.  You can create that user but the SIDs do not match.  SQL Server provides a stored procedure to check for this scenario.</p>
<p>sp_change_users_login &#8216;report&#8217;</p>
<p>To correct it, use the same stored procedure with a different command.</p>
<p>sp_change_users_login &#8216;update_one&#8217;, &#8216;{username}&#8217;, &#8216;{login}&#8217;</p>
<p>This will make sure that your username and login have the same SID.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonrowland.com/2009/08/login-failed-after-restoring-database-on-sql-server-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
