/etc/init.d/mysql stop
Create a text file
UPDATE mysql.user SET Password=PASSWORD('XXX') WHERE User='root';
FLUSH PRIVILEGES;
Start MySQL in safe mode with init file
mysqld_safe --init-file=/path/of/your/file
Stop and start the mysql server and you should be able to login!
:)
No comments:
Post a Comment