Mengubah Password root MySQL

Caranya :
1. Stop dulu MySQL database server dengan menjalankan perintah :
/etc/init.d/mysql stop
atau
/etc/init.d/mysqld stop
atau
/usr/local/etc/rc.d/mysql-server stop
Lalu, Start MySQL server tanpa password sehingga bisa untuk mengulangi password
mysqld_safe –skip-grant-tables &
Login tanpa password, enter :
mysql -u root
Terakhir, Masukkan Password root baru untuk MySQL:
USE mysql;
UPDATE user SET password=PASSWORD(“PASSWORD-BARU”) WHERE
User=’root’;
FLUSH privileges;
quit
Tulisan PASSWORD-BARU diubah dengan passwor Anda. Restart jalannya mysql
server :
/etc/init.d/mysql restart
Tes Hasilnya jadi atau tidak pasword barunya :
mysql -u root -p
(Sumber : http://www.cyberciti.biz/faq/lost-mysql-admin-password/)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: