<?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>sp2hari@weblog... &#187; mysql</title>
	<atom:link href="http://sp2hari.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://sp2hari.com</link>
	<description>I see, learn and rediscover... everyday!</description>
	<lastBuildDate>Thu, 24 Nov 2011 22:06:19 +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>Forgot mysql root pass ?</title>
		<link>http://sp2hari.com/2007/01/30/forgot-mysql-root-pass/</link>
		<comments>http://sp2hari.com/2007/01/30/forgot-mysql-root-pass/#comments</comments>
		<pubDate>Tue, 30 Jan 2007 19:19:00 +0000</pubDate>
		<dc:creator>sp2hari</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[lostpass]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://sp2hari.com/?p=27</guid>
		<description><![CDATA[Recently forgot mysql root password for one of the servers i maintain . Little bit googling helped me to reset the password .Just copy pasted the tutorials i saw so that i need not google again . If you have set a root password, but forgot what it was, you can set a new password [...]]]></description>
			<content:encoded><![CDATA[<p>Recently forgot mysql root password for one of the servers i maintain . Little bit googling helped me to reset the password .<br />Just copy pasted the tutorials i saw so that i need not google again .
<p>If you have set a <code>root</code> password, but forgot what it was, you can set a new       password with the following procedure:</p>
<ol>
<li>Take down the <code>mysqld</code> server by sending a <code>kill</code> (not <code>kill           -9</code>) to the <code>mysqld</code> server. The pid is stored in a <tt>`.pid'</tt> file,           which is normally in the MySQL database directory:
<pre>shell> kill `cat /mysql-data-directory/hostname.pid`</pre>
<p>           You must be either the Unix <code>root</code> user or the same user <code>mysqld</code>           runs as to do this.         </li>
<li>Restart <code>mysqld</code> with the <code>--skip-grant-tables</code> option.         </li>
<li>Set a new password with the <code>mysqladmin password</code> command:
<pre>shell> mysqladmin -u root password 'mynewpassword'</pre>
</li>
<li>Now you can either stop <code>mysqld</code> and restart it normally, or just load the           privilege tables with:
<pre>shell> mysqladmin -h hostname flush-privileges</pre>
</li>
<li>After this, you should be able to connect using the new password.</li>
</ol>
<p>Alternatively, you can set the new password using the <code>mysql</code> client:
<ol>
<li>Take down and restart <code>mysqld</code> with the <code>--skip-grant-tables</code>           option as described above.         </li>
<li>Connect to the <code>mysqld</code> server with:
<pre>shell> mysql -u root mysql</pre>
</li>
<li>Issue the following commands in the <code>mysql</code> client:
<pre>mysql> UPDATE user SET Password=PASSWORD('mynewpassword')   ->             WHERE User='root';mysql> FLUSH PRIVILEGES;</pre>
</li>
<li>After this, you should be able to connect using the new password.         </li>
<li>You can now stop <code>mysqld</code> and restart it normally.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://sp2hari.com/2007/01/30/forgot-mysql-root-pass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

