Reset MySQL root password

  • Stop mysql (bisa dg kill atau service mysqld stop misalnya)
  • $ mysqld_safe –skip-grant-tables
  • $ mysql –user=root mysql
  • mysql> UPDATE user SET Password=PASSWORD(‘password-baru’) WHERE  user=’root’;
  • mysql> FLUSH PRIVILEGES;
  • mysql> quit

One thought on “Reset MySQL root password”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.