<?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>Ubuntu Linux, ubuntu desktop, Linux operating system, ubuntu guide &#187; Mysql</title>
	<atom:link href="http://ubuntulinux.co.in/blog/category/database/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://ubuntulinux.co.in/blog</link>
	<description>How to fix the Technical issue in Ubuntu linux</description>
	<lastBuildDate>Sat, 21 Jan 2012 05:57:04 +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>How to Reset the mysql root password in LInux</title>
		<link>http://ubuntulinux.co.in/blog/ubuntu/how-to-reset-the-mysql-root-password-in-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-reset-the-mysql-root-password-in-linux</link>
		<comments>http://ubuntulinux.co.in/blog/ubuntu/how-to-reset-the-mysql-root-password-in-linux/#comments</comments>
		<pubDate>Mon, 31 May 2010 10:37:05 +0000</pubDate>
		<dc:creator>sahab</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[RHEL5]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu 10.04]]></category>
		<category><![CDATA[ubuntu 7.10]]></category>
		<category><![CDATA[ubuntu 8.04]]></category>
		<category><![CDATA[ubuntu 8.10]]></category>
		<category><![CDATA[ubuntu 9.04]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[How to Reset the mysql root password]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu guide]]></category>
		<category><![CDATA[ubuntu linux]]></category>

		<guid isPermaLink="false">http://ubuntulinux.co.in/blog/?p=205</guid>
		<description><![CDATA[How to Reset the mysql root password ]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: small;">Mysql installation time, If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:</span></p>
<pre><strong><span style="font-size: small;">$ mysqladmin -u root password NEWPASSWORD</span></strong></pre>
<p><span style="font-size: small;">However, if you want to change (or update) a root password, then you need to use following command </span></p>
<pre><strong><span style="font-size: small;">$ mysqladmin -u root -p'oldpassword' password newpass</span></strong></pre>
<p><span style="font-size: small;">For example, If old password is dbase, and set new password to dbase123, enter:</span></p>
<pre><strong><span style="font-size: small;">$ mysqladmin -u root -p'dbase' password 'dbase123'</span></strong></pre>
<div>
<div><span style="font-size: small;">Other then the ways specified here to reset and change the root password for mySQL</span><span style="color: blue; font-size: small;"> </span><span style="font-size: small;"><a id="KonaLink0" href="http://www.mydigitallife.info/2006/06/06/change-and-reset-mysql-root-password/#" target="undefined"></a>in the case that the password is forgotten or lost,<br />
</span></div>
<div><span style="font-size: small;"> </span></div>
<div><span style="font-size: small;"> 1)Stop the mysql demon process using this command</p>
<p><strong> sudo /etc/init.d/mysql stop</strong></p>
<p>2)Start the mysqld demon process using the &#8211;skip-grant-tables option with this command</p>
<p><strong> sudo /usr/sbin/mysqld &#8211;skip-grant-tables &#8211;skip-networking &amp;</strong></p>
<p>3)start the mysql client process using this command</p>
<p><strong>mysql -u root</strong></p>
<p>from the mysql prompt execute this command to reset/update your password</p>
<p><strong>SET PASSWORD FOR root@&#8217;localhost&#8217; = PASSWORD(&#8216;password&#8217;);</strong></p>
<p>If you have a mysql root account that can connect from everywhere, you should also do:</p>
<p><strong>UPDATE mysql.user SET Password=PASSWORD(&#8216;newpwd&#8217;) WHERE User=&#8217;root&#8217;;</strong></p>
<p>Alternate Method:</p>
<p><strong>USE mysql<br />
UPDATE user SET Password = PASSWORD(&#8216;newpwd&#8217;)<br />
WHERE Host = &#8216;localhost&#8217; AND User = &#8216;root&#8217;;</strong><br />
And if you have a root account that can access from everywhere:<br />
<strong><br />
USE mysql<br />
UPDATE user SET Password = PASSWORD(&#8216;newpwd&#8217;)<br />
WHERE Host = &#8216;%&#8217; AND User = &#8216;root&#8217;;<br />
</strong><br />
For either method, once have received a message indicating a successful query (one or more rows affected), flush privileges:</p>
<p><strong>FLUSH PRIVILEGES;</strong><br />
exit</span></div>
<div><span style="font-size: small;"><br />
Then stop the mysqld process </span></div>
<div><span style="font-size: small;"><br />
<strong>sudo /etc/init.d/mysql stop<br />
sudo /etc/init.d/mysql start</strong></span></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ubuntulinux.co.in/blog/ubuntu/how-to-reset-the-mysql-root-password-in-linux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

