steps to change the mysql password is as follows:
1. You run the mysql with the following command:
/etc/init.d/mysql start || service mysql start
2.Sign in to mysql by typing the following command:
mysql -u root -p
when prompted enter the password in it because by default the password blank.
3.Select the mysql database by typing the following command:
use mysql;
4.To find a list of existing users enter the following command :
select user,password from user;
5.If there's just delete the blank user because if not delete all the one entered into the database just by typing the command mysql only.
delete user from user where user='';
6.Well now we only replace his root password
update user set password=password(‘password baru’) where user=’root’;
7.Then write flush privileges;
8.Replacement of the password has been finished, now exit from mysql by typing quit;
9.Restart mysql with command /etc/init.d/mysql restrart certainly by the root user.
Well now we've got a new mysql password. So when we go in as root user will be asked for his password.
1 komentar:
oke bos, terima kasih atas petunjuknya
Poskan Komentar