I was having trouble following instruct on some website with using mysqladmin,
some how it didn't work, luckily I remember the method below.
1 .You need to run mysql in safe-mode
safe_mysqld --user=mysql --skip-grant-tables --skip-networking &
2. Access mysql:
mysql
3. Get a list of user from the database
use mysql;
select * from user;
4. Pick a user to change their password.
In my case it was a fresh install so I change all the user password
In my case it was a fresh install so I change all the user password
update user set password=password('newPassword');
5. Flush the privileges
FLUSH PRIVILEGES
6. Restart mysql
killall mysqld
service mysql start
No comments:
Post a Comment