Sometimes, you can’t avoid it.. uh.. ?! Linux of course !
Some times ago, i needed to recover some broken tables on one of our databases.
When i saw that “innodb_force_recovery” did not help, i remembered a tool : Undrop For Innodb from TwinDB https://twindb.com/undrop-tool-for-innodb/
You know the drill : “Unfortunatly, this is a Linux Only Tool”
I decided to make a VM on VirtualBox with Centos & Undrop for InnoDB, and tried to recover the tables… At the end of the journey, table was recovered and they lived happily ever after and had many children !
So today i want to share this with a little tutorial, i’ve called this VM : “MySQL Toolbox” and i made 2 bash scripts to initialize and maintain it.
MySQL Toolbox contains the following MySQL tools :
- Undrop for Innodb
- Percona Toolkit
- MySQL Workbench
- MySQL Utilities
- MySQL Clients
- Several GUI productivity tools : Firefox, Text Editor, File browser…
How to setup ?
First Download Centos 7 Minimal
Then download & install VirtualBox
Then create a New VM in VirtualBox ; Name it, size it…
Then Start the VM
Choose the iso previously downloaded
Chose installation destination
Then “Network & Hostname” > Activate network by default
Then “Begin Installation” ; During installation, set root password
At the end of the installation, reboot
Congratulation, you have now a clean install of centos 7 ! Then login with root account
then type the following commands to make http request
yum -y install wget
Then, download the script
Now grant the right to execute the script
chmod +x MTB.sh
Launch the script !
After some time, the VM should reboot !
Log in with root user and your password
Then you have some documentation shortcuts on the desktop. The tools are available from Centos start menu and from Terminal for command-lines tools.
How To Update ?
All of this tools are updated regulary, so to update :
chmod +x MTB_Update.sh
If i find other great tools, i will update the script to include them. If you find & need other tools, let me know i will include them.
Project is on Bitbucket : https://bitbucket.org/Marc-T/mysql-toolbox
That’s all folks !