<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://morison.biz/technotes/feeds/rss.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/" 
	xmlns:dc="http://purl.org/dc/elements/1.1/" 
	xmlns:icbm="http://postneo.com/icbm/" 
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/" 
	xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" 
	xmlns:wfw="http://wellformedweb.org/CommentAPI/" >

<channel>
	<title>Comments for: How To change the mysql root password (or any mysql password)</title>
	<link>http://morison.biz/technotes/articles/9</link>
	<description>Ever inherit a mysql server that no one knew the root password, or perhaps any of the passwords?

# do logged in as root:
/etc/init.d/mysqld stop

# make sure mysqld_safe is not running
ps axu | grep mysql

# NEXT COMMAND ONLY IF mysql IS HUNG AND WONT
# SHUTDOWN NICELY; THE AUTHOR DISCLAIMS ANY DAMAGE
# DUE TO kill -9 'ing...
# If there are still mysql's left, kill -9
# &amp;lt;WARNING&amp;gt; dangerous to do, if kill -9 can
# leave corrupted tables if the server is mid
# transaction!&amp;lt;/WARNING&amp;gt;
pkill -9 mysql

# Here's the key: --skip-grant-tables bypasses 
# passwords &amp;amp; such...
/usr/sbin/mysqld --skip-grant-tables &amp;amp;
# or, for some distros/installs installations... 
/usr/bin/mysqld_safe --skip-grant-tables &amp;amp;

# run mysql client and change pass
mysql
mysql&amp;gt; USE mysql;
mysql&amp;gt; UPDATE user SET Password=PASSWORD('newpass') WHERE User='root';
mysql&amp;gt; FLUSH PRIVILEGES;
mysql&amp;gt; QUIT

# Then, kill the locally running daemon and 
# start from /etc/init.d
pkill mysql
/etc/init.d/mysql start</description>
	<language>en</language>
	<copyright>2006-2008, Rod Morison Software</copyright>
	<managingEditor>technotes@morison.biz</managingEditor>
	<lastBuildDate>Sun, 20 May 2012 04:52:25 GMT</lastBuildDate>
	<generator>Yet Another Community System</generator>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>70</ttl>

</channel>
</rss>
