How do I delete all of the controls in SimpleRisk at once?
This FAQ will walk you through the process of safely removing all controls, control tests, control comments, control test results, and active control audits. Following these steps will help ensure that the removal is completed without any issues. If you currently do not have any tests defined, have not run any audit tests, or have not added comments to any control tests, you can skip these steps; however, it won’t hurt to perform them just in case. Additionally, if you have the ComplianceForgeSCF feature activated, I recommend deactivating it before you start the removal process. You can easily reactivate it once all controls have been successfully removed.
Before you start, I highly recommend creating a backup of your database. Whenever you execute MySQL commands through the console, there is a risk of encountering issues that could potentially damage your data. Having a backup on hand will make recovery much simpler. To back up your database, navigate to "Configure" at the top of the program, then select "Register & Upgrade" from the left menu. On the right side of the page, you will find the "Backup the Database" button. Click it, and a copy of the database will be downloaded to your device. If your instance is not registered and you prefer not to register, you can follow the instructions provided here: How to Backup Your SimpleRisk Instance (Use Method #2).
To proceed with this process, you will need access to the terminal on the server where SimpleRisk is installed. If you already have root credentials, you can bypass this section. However, if you do not have root access, please follow the steps below to connect to your MySQL console.
1) In terminal use "cat /var/www/simplerisk/includes/config.php".
If you are not using the default location for SimpleRisk you may need to adjust the path accordingly.
2) Now use "mysql -u simplerisk -p"
If you changed the name for the SimpleRisk database during install you should see it in the config.php that should be written out to the console after DB_USERNAME.
3) It will now ask for a password copy and paste the password from the config.php located after DB_PASSWORD
4) You should now be logged into the MySQL console and have a prompt of "mysql>"
Once you are logged into the MySQL console, we will proceed to remove a total of five tables and recreate them. To simplify this process, I will provide you with commands that you can directly input into the console for easy copying and pasting. Please remember that if you have renamed the SimpleRisk database, you should replace "SimpleRisk" with your chosen database name in the first command.
MySQL Commands:
USE simplerisk;
TRUNCATE framework_controls;
TRUNCATE framework_control_tests;
TRUNCATE framework_control_test_audits;
TRUNCATE framework_control_test_comments;
TRUNCTATE framework_control_test_results;
This concludes the steps to resetting your Controls in SimpleRisk completely. If you have any questions or concerns or find issues with this FAQ please contact us at: support@simplerisk.com