In a similar case, today I was unable to login into MySQL, into ISPConfig, and even into my Linode. The solution to reset the root passwords was the following.
First, the Linode (Debian 5.0):
Linode Manager > Dashboard > Shutdown
Linode Manager > Settings & Utilities > Change a Filesystem's root Password
Linode Manager > Dashboard > Boot
After that I could login again into my Linode via SSH (PuTTY) and SFTP (WinSCP).
Then, I tried many online suggestions to also reset the MySQL root password, with no success, always getting:
Code:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
MySQL's
B.5.4.1. How to Reset the Root Password seemed pretty complex, so I used another simpler
solution, and it worked:
Code:
/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
/etc/init.d/mysql stop
/etc/init.d/mysql start
Additionaly, I use the ISPConfig control panel, and this page was helpful for the third password I had to reset:
How to reset the administrator password in ISPConfig 3. And then, to change the new password:
ISPConfig > Tools > Password and Language
Hope this helps others in similar situations.