<?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>Proxyutza blog &#187; MySQL</title>
	<atom:link href="http://www.proxyutza.com/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.proxyutza.com</link>
	<description>About all sorth of things: PHP, Hacks, Scripts, Servers, Linux, Technology, News, Trends</description>
	<lastBuildDate>Wed, 26 May 2010 10:37:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Reset MySQL root password</title>
		<link>http://www.proxyutza.com/reset-mysql-root-password/</link>
		<comments>http://www.proxyutza.com/reset-mysql-root-password/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 17:39:46 +0000</pubDate>
		<dc:creator>ProXy</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.proxyutza.com/2008/03/13/reset-mysql-root-password/</guid>
		<description><![CDATA[Today i had the bad luck to run into this problem. On one of my servers i have debian installed on it, nothing fancy , apache, mysql, phpmyadmin and cacti. I never use this server for hard work or anything that goes public, just personal stuff and different projects for testing purpose. Today i wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Today i had the bad luck to run into this problem. On one of my servers i have debian installed on it, nothing fancy , apache, mysql, phpmyadmin and cacti. I never use this server for hard work or anything that goes public, just personal stuff and different projects for testing purpose. Today i wanted to install the KFM script, the main reason beeing the ability to edit files very easy online, i mean text files. Its AJAX interface its very nice and provides all the functionality that you need. So this KFM script uses a database, i said no problem, but when i tried to access my phpmyadmin, surprise i couldn&#8217;t get the password to work. I never had an issue like this in the past, so i didn&#8217;t knew what to do. But the mighty <a href="http://www.google.com" title="Google searchengine" target="_blank">Google</a> saved me. After doing a little research i found out what i need to do in order to reset my MySQL root password. There are basically five steps which you need to pass.</p>
<p>#1 Is to stop the mysql process with the following command:</p>
<p><strong>/etc/init.d/mysql stop</strong></p>
<p>#2 You need to start the MySQL(mysqld) server process with the &#8211;skip-grant-tables option so that it will skip the password verification. We do this with the following command:</p>
<p><strong>mysqld_safe &#8211;skip-grant-tables &amp;</strong></p>
<p>and you should get a result something like this:</p>
<pre>Starting mysqld daemon with databases from /var/lib/mysql</pre>
<pre>mysqld_safe[5121]: started</pre>
<p>#4 Now you can connect to MySQL as the root user with the following command:<br />
<code><br />
<strong>mysql -u root</strong></code></p>
<p>and you should get a result something like this:</p>
<p><code>Welcome to the MySQL monitor.  Commands end with ; or \g.<br />
Your MySQL connection id is 227<br />
Server version: 5.0.32-Debian_7etch5-log Debian etch distribution</code></p>
<p><code>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.</code></p>
<p><code>mysql&gt;</code></p>
<p>#4 Now you need to setup the new root password</p>
<p><code>mysql&gt; use mysql;</code><br />
<code>mysql&gt; update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';</code><br />
<code>mysql&gt; flush privileges;</code><br />
<code>mysql&gt; quit</code></p>
<p>#5 Stop then start theMySQL server and test the new password</p>
<p><strong>/etc/init.d/mysql stop</strong></p>
<p><strong>/etc/init.d/mysql start</strong></p>
<p><strong>mysql -u root -p</strong></p>
<p>When i think about it now, it was quite easy, but when i was searching for the solution it was quite hard to get to it <img src='http://www.proxyutza.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.proxyutza.com/reset-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
