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

1 thought on “Reset MySQL root password”

Leave a Reply

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