First login into mysql:
mysql -uadmin -p
SELECT REPLACE(sys_users.home,’/home/httpd/vhosts/’,”) AS domain, sys_users.login,accounts.password FROM sys_users LEFT JOIN accounts on sys_users.account_id=accounts.id ORDER BY sys_users.home DESC ;
After messing with the password change in Drupal 7 it seems I’ve blocked myself out. Drupal keeps the flood entries in a mysql table called flood. To recover from this run in sql:
After this if the password is good you should be able to login.
This problem is explained here http://drupal.org/node/1023440
One friend of mine was playing these days with mysql and while browsing the “mysql” database he tried to alter some permissions and he ended up deleting the root account. If you are still logged in to mysql CLI you can recover from this but what do you do if you logout?
I’m not aware of any trick to recover from this problem so my only solution was to backup all its databases from /var/lib/mysql and then delete /var/lib/mysql. Afterwards I start the mysql daemon so the root user and settings are regenerated. In the end I move back the databases to /var/lib/mysql and do a service mysqld restart.
Anyone other hints on recovering from this?
Login to mysql and :
SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id
It should print all emails that are created and their passwords.