This is a quick guide to reset an “unknown” MySQl root password.
Table of Contents
I once need to do that, and after i tried 2 or 3 different ways, i found that one to be the best in my case.
1 stop current mysql server instance
2 restart one in safe_mode
/usr/bin/mysqld_safe --skip-grant-tables &
3 enter localhost mysql shell
mysql -h localhost
4 get the job done
mysql> USE mysql mysql> UPDATE user -> SET password=password('<enter_your_password_here>') -> WHERE user='root' AND host='localhost'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> quit Bye
- How-to : NTOP install on RHel/CentOS 6
- How-to : Install yasdp (Yet Another Shutdown Plasmoid) on kde 4