Skip to content

Recover MySQL Root Password

by Beni on Juli 8th, 2010
  1. Stop mysqld process:
    /etc/init.d/mysql stop
  2. Start mysqld with –skip-grant-tables:
    mysqld --skip-grant-tables
  3. Open another shell, login as root:
    mysql -uroot
  4. Switch to the “mysql” Database:
    use mysql;
  5. Change root password in mysql console:
    UPDATE user SET password=PASSWORD('newpassword') WHERE user='root';
  6. leave mysql console:
    quit;
  7. Restart mysql daemon:
    /etc/init.d/mysql restart

Have fun!

Das wird dich vielleicht auch interessieren:

From → Tipps&Tricks

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS