sudo /etc/init.d/mysql stopNow start up MySQL in safe mode, so you'll skip the privileges table:
sudo mysqld_safe --skip-grant-tables &Login with root:
mysql -urootAnd assign the DB that needs to be used:
use mysql;Now all you have to do is reset your root password of the MySQL user and restart the MySQL service:
update user set authentication_string=password('1111') where user='root';flush privileges;
quit and restart MySQL:
quitsudo /etc/init.d/mysql stopsudo /etc/init.d/mysql start
No comments:
Post a Comment