1. Masuk terminal dan login sebagai root.
Kemudian matikan service mysqlnya dengan perintah berikut ini :
/etc/init.d/mysql stop
Setelah itu kita akan mereset password dalam artian root mysql tanpa password dengan perintah sebagai berikut :
mysqld_safe --skip-grant-tables &
Setelah itu lakukan login tanpa password dengan perintah berikut ini :
mysql -u root
Setelah itu atur ulang password baru dengan perintah berikut ini :
USE mysql;
UPDATE user SET password=PASSWORD("a1b2c3d4e5") WHERE User='root';
FLUSH privileges;
quit
Kemudian restart service mysqlnya dengan perintah berikut ini :
/etc/init.d/mysql restart
Test hasil password dengan cara login dengan perintah berikut ini :
mysql -u root -p
2. Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.
1.Stop the MySQL Server.
sudo /etc/init.d/mysql stop
2.Start the mysqld configuration.
sudo mysqld --skip-grant-tables &
3.Login to MySQL as root.
mysql -u root mysql
4.Replace YOURNEWPASSWORD with your new password!
UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
3. sudo dpkg-reconfigure mysql-server-5.1
Tidak ada komentar:
Posting Komentar