Sometimes I forget some password for accessing CMS system and mail is not working and …
So far it never happened that I forgot some more important password, such as MySQL access password in which case I can change password directly in the database and thus enable myself to access the CMS backend
The “magic” line is
UPDATE table_name SET column_to_change WHERE record_to_update;
To be less general and less abstract: in case of password change the line should look like this:
UPDATE table_name SET password_column = MD5(‘new_password’) WHERE ID = user_id_to_change;