So you find yourself locked out of your SimpleRisk instance? Don't fret with the following steps in this guide you will access your mysql console and manually set the value for the admin password to regain access.
We start by finding the hostname. To do this you need to look at your simplerisk/includes/config.php file. This file should contain the username and password you will need to connect to the SimpleRisk mysql instance. Below is a sample of what this config should look like. The red boxes in the figure below denote the locations of the DB username and password in that order.
We now need to access the mysql database to do this we use the figures gathered in the first step.
Type “mysql -u username -p password”
If you have the correct username and password it should bring you to a screen resembling the following.
Once in your mysql console you need to select the simplerisk db by typing the command:
Next to verify your admin account is still there type the following command:
"Select value username from user;"
If this command returns something like the following then continue on
Last use the following command to reset your admin account password to “admin”:
"update user set salt='sAbwTbIFywWKcheyQw9a', password='$2a$15$7b2601b4979b1ad031b2fuqf1XkeSa4iNxsHK27tq5Va2jLhzkShW' where value=1;"
That should have returned your password back to the default “admin” password and you should be able to log in and change it to whatever you need.