From: Dan Nelson Date: April 4 2006 3:33pm Subject: Re: new password will not be effective for connection immediately List-Archive: http://lists.mysql.com/mysql/196497 Message-Id: <20060404153321.GA32089@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Apr 04), NanFei Wang said: > I want to change the password of the User( which is root) in the > table 'user' from the database 'mysql'. > > I use the String sql = "update user set > Password=password('somePassWord') where User='root'"; I see from > MySql Query Browser the password really changed ! If you edit the mysql tables directly, you must use the "FLUSH PRIVILEGES" command to tell mysql that they have changed. A cleaner alternative would be to use the "SET PASSWORD" command. http://dev.mysql.com/doc/refman/5.0/en/user-account-management.html -- Dan Nelson dnelson@stripped