Cara Mengubah Password MySQL User Melalui Command Line

Dibawah ini terdapat langkah-langkah untuk mengubah password MySQL melalui Command Line.

$mysql -h localhost -u root -p
mysql> use mysql;
mysql> UPDATE user SET password=PASSWORD(“somesecretwords”) where User=’root’;
mysql> flushprivileges;
mysql> quit;

* normally, restart service not required. but if you need to restart mysql service: $sudo /etc/init.d/mysql restart

Published by

Riza

Web Developer & Designer

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.