HomePage » Database » MySQL » MysqlPasswordReset


Resetting Mysql root password

Mysql password can be reset by
  1. Shutdown mysql
  2. Start mysql with a special option safe_mysqld --skip-grant-tables
  3. Login to mysql and update the user table UPDATE user SET password=null WHERE Host='localhost' AND User='root';
  4. Shutdown mysql
  5. Startup mysql normally
  6. Change the root password by mysqladmin -uroot password 'new-password'

Resetting mysql user password

mysql> set password = password("yournewpassword"); 


Another way

http://code.openark.org/blog/mysql/dangers-of-skip-grant-tables
Comments [Hide comments/form]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki