Cara reset password root MySQL

Berikut ini panduan cara reset password root MySQL atau MariaDB

  • Stop service mysql
    service mysql stop
    killall mysqld

  • Start mysql pada mode safe
    mysqld_safe --skip-grant-tables &

  • Masuk dengan akun root tanpa password
    mysql -uroot

  • Akses database mysql
    use mysql;

  • Ganti password 123456 sesuai keinginan
    update user set password=PASSWORD("123456") where User='root';

  • Reload grant table
    flush privileges;

  • Keluar dari MySQL command
    quit

  • Aktfikan kembali service mysql
    service mysql start

Selesai, selamat mencoba 😀

No ratings yet.

Please rate this

Related Posts

Leave a Reply

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