MYSQL MD5 Passwort reset in database
In case you have to alter a MD5 password in a mySQL table
- Create the MD5 hash of your password
- Create a file called password.txt, containing nothing but the new password
- Having a MAC: md5 -q ./password.txt; rm ./password.txt
- Login your database
- mysql -u root -p
- show databases;
- use (name-of-database, i.e. mailer);
- show tables;
- select * from users; (to see what is in your DB)
- UPDATE users SET password=”(MD5-string-you-made)” WHERE ID = (id#-of-account-you-are-reseting-password-for);
- “SELECT ID, user_login, user_pass FROM (name-of-table-you-found);” (to confirm your changes)