<?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>NamHuy &#187; unix</title>
	<atom:link href="http://namhuy.org/blog/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://namhuy.org/blog</link>
	<description>Includes news, help, tutorials, programming, tips and how-to guides for Linux, UNIX, and BSD</description>
	<lastBuildDate>Fri, 20 Jan 2012 19:37:47 +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 Change root Password</title>
		<link>http://namhuy.org/blog/2010/07/23/mysql-change-root-password/</link>
		<comments>http://namhuy.org/blog/2010/07/23/mysql-change-root-password/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:39:11 +0000</pubDate>
		<dc:creator>Huy Tran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[freebsb]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[telnet]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://namhuy.org/blog/?p=100</guid>
		<description><![CDATA[How do I change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session? Setting up mysql password is one of the essential tasks. By default root user is MySQL admin account. Please &#8230; <a href="http://namhuy.org/blog/2010/07/23/mysql-change-root-password/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>How do I change MySQL root password under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session?</p>
<p>Setting up mysql password is one of the essential tasks. By default root user is MySQL admin account. Please note that the Linux / UNIX login root account for your operating system and MySQL root are different. They are separate and nothing to do with each other (indeed some admin removes root account and setup admin as mysql super user).<br />
mysqladmin command to change root password</p>
<p>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:</p>
<p>$ mysqladmin -u root password NEWPASSWORD</p>
<p>However, if you want to change (or update) a root password, then you need to use following command</p>
<p>$ mysqladmin -u root -p&#8217;oldpassword&#8217; password newpass</p>
<p>For example, If old password is abc, and set new password to 123456, enter:</p>
<p>$ mysqladmin -u root -p&#8217;abc&#8217; password &#8217;123456&#8242;</p>
<p>Change MySQL password for other user</p>
<p>To change a normal user password you need to type (let us assume you would like to change password for vivek):</p>
<p>$ mysqladmin -u vivek -p oldpassword password newpass</p>
<p>Changing MySQL root user password using MySQL sql command</p>
<p>This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:</p>
<p>1) Login to mysql server, type following command at shell prompt:</p>
<p>$ mysql -u root -p</p>
<p>2) Use mysql database (type command at mysql&gt; prompt):</p>
<p>mysql&gt; use mysql;</p>
<p>3) Change password for user vivek:</p>
<p>mysql&gt; update user set password=PASSWORD(&#8220;NEWPASSWORD&#8221;) where User=&#8217;vivek&#8217;;</p>
<p>4) Reload privileges:</p>
<p>mysql&gt; flush privileges;<br />
mysql&gt; quit</p>
<p>This method you need to use while using PHP or Perl scripting.</p>
<div class="bottomcontainerBox" style="background-color:#F0F4F9;">
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fnamhuy.org%2Fblog%2F2010%2F07%2F23%2Fmysql-change-root-password%2F&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width=80px; height:21px;" allowTransparency="true"></iframe></div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<g:plusone size="medium" href="http://namhuy.org/blog/2010/07/23/mysql-change-root-password/"></g:plusone>
			</div>
			<div style="float:left; width:80px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;">
			<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://namhuy.org/blog/2010/07/23/mysql-change-root-password/"  data-text="MySQL Change root Password" data-count="horizontal">Tweet</a>
			</div>			
			<div style="float:left; width:85px;padding-right:10px; margin:4px 4px 4px 4px;height:30px;"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&amp;r=http://namhuy.org/blog/2010/07/23/mysql-change-root-password/"></script></div>			
			</div><div style="clear:both"></div><div style="padding-bottom:4px;"></div>]]></content:encoded>
			<wfw:commentRss>http://namhuy.org/blog/2010/07/23/mysql-change-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.283 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-04 18:05:08 -->
<!-- Compression = gzip -->
