Cara Mengubah Password User di Database MySQL

Login ke server Database
mysql -u root -p
ALTER USER 'username_kamu'@'localhost' IDENTIFIED BY 'Pa5w0Rd@te';
FLUSH PRIVILEGES;
exit;
Reset root Password

reset Mysql Root password:
/etc/init.d/mysqld stop
mysqld_safe --skip-grant-tables &
mysql -uroot -p ( hit enter, without any password)
use mysql
UPDATE mysql.user SET password=PASSWORD('your_new_password') WHERE user='root';
FLUSH PRIVILEGES;
quit
/etc/init.d/mysqld restart
Previous Post
No Comment
Add Comment
comment url