<?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>Tips and Tricks &#187; MySQL</title>
	<atom:link href="http://www.legend.ws/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.legend.ws/blog</link>
	<description>Random tech ramblings</description>
	<lastBuildDate>Wed, 11 Jan 2012 16:11:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL password hashing</title>
		<link>http://www.legend.ws/blog/tips-tricks/mysql-password-hashing/</link>
		<comments>http://www.legend.ws/blog/tips-tricks/mysql-password-hashing/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 18:55:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[hashing]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[mysql 4]]></category>
		<category><![CDATA[mysql 5]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://www.legend.ws/blog/?p=35</guid>
		<description><![CDATA[<p>Whenever you upgrade your MySQL installation, make sure to upgrade any client that uses it.</p>
<p>In some cases, clients that use a version prior to 4.1 will have a problem authenticating against the MySQL database if the latter has a post 4.1 version.</p>
<p>The trick is that after 4.1 (i.e. 4.11 and up), MySQL changed the way it stores the passwords in the <strong>user</strong> table inside the <strong>mysql</strong> system database.<br />
Password hashes are now 41 bytes long instead of the old 16 bytes.</p>
<p>So for example, if your MySQL server is 5.0, while your <strong>php-mysql</strong> library is 4.1, your web &#8230;</p>]]></description>
		<wfw:commentRss>http://www.legend.ws/blog/tips-tricks/mysql-password-hashing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up MySQL database replication</title>
		<link>http://www.legend.ws/blog/tips-tricks/mysql-database-replication/</link>
		<comments>http://www.legend.ws/blog/tips-tricks/mysql-database-replication/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 18:50:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.legend.ws/blog/tips-tricks/mysql-database-replication/</guid>
		<description><![CDATA[<p>It&#8217;s always about data. What&#8217;s the use of any system without the data it relies on?</p>
<p>Setting up a database replication is one of many steps that should be taken in order to preserve data, preventing any loss and making disaster recovery easier.</p>
<p>Luckily, it&#8217;s easy with MySQL. So let&#8217;s suppose we have two servers running MySQL, one called host1 and the other host2.<br />
Replication can be either master-master or master-slave. With a master-slave replication, the slave always replicates what the master database is executing. In master-master replication, both databases synchronize with each others.</p>
<p>For the purpose of this tutorial, &#8230;</p>]]></description>
		<wfw:commentRss>http://www.legend.ws/blog/tips-tricks/mysql-database-replication/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Resetting your mysql root password</title>
		<link>http://www.legend.ws/blog/tips-tricks/reset-mysql-root-password/</link>
		<comments>http://www.legend.ws/blog/tips-tricks/reset-mysql-root-password/#comments</comments>
		<pubDate>Thu, 17 May 2007 08:10:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.legend.ws/blog/tips-tricks/reset-mysql-root-password/</guid>
		<description><![CDATA[<p>It is quite frequent that an administrator simply forgets his mysql&#8217;s root password.</p>
<p>Luckily, it is quiet easy to reset it, here are the steps:</p>
<ol>
<li>SSH as root to your machine</li>
<li>Turn off the mysqld daemon if running</li>
<ul>
<li>RedHat/Fedora users can do so by executing:Â  service mysqld stop</li>
</ul>
<li>Run safe_mysqld by executing:</li>
<ul>
<li>safe_mysqld &#8211;skip-grant-tables<br />
(this will run allow you to connect without a password)</li>
</ul>
<li>Open a second shell / SSH again and execute:</li>
<ul>
<li>mysql mysql<br />
(to directly connect and select the mysql database which contains the user authentication data)</li>
</ul>
<li>On the mysql prompt, execute:</li>
<ul>
<li>update user set password=password(&#8216;newpassword&#8217;) where user=&#8217;root&#8217;;</li></ul>&#8230;</ol>]]></description>
		<wfw:commentRss>http://www.legend.ws/blog/tips-tricks/reset-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import a csv file into mysql from the prompt</title>
		<link>http://www.legend.ws/blog/tips-tricks/import-csv-mysql-prompt/</link>
		<comments>http://www.legend.ws/blog/tips-tricks/import-csv-mysql-prompt/#comments</comments>
		<pubDate>Thu, 11 Jan 2007 17:40:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.legend.ws/blog/tips-tricks/import-csv-mysql-prompt/</guid>
		<description><![CDATA[<p>For the follows out there who do not know how to import coma separated data into mysql from the prompt, here it is:</p>
<p>Assume:</p>
<p>PATH is the path to the csv file (can be relative to the directory you were in before logging into mysql)<br />
TABLE is the table name that you have already created and whos fields match the csv file fields.<br />
USERNAME is the mysql user that have access to insert data into TABLE<br />
DATABASE is the database containing that table</p>
<p>- login to mysql by typing: mysql -u USERNAME -p DATABASE<br />
The prompt will ask you for &#8230;</p>]]></description>
		<wfw:commentRss>http://www.legend.ws/blog/tips-tricks/import-csv-mysql-prompt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

