Last Updated on
Ephesoft/MySQL was uninstalled and a database dump was not taken prior to being uninstalled. A database now needs to be recovered and all you have is a backup folder which contains the MySQL data files.
This procedure will teach you how restore a MySQL database onto another computer using the data files, dump the MySQL database and restore the dumped database to another. This can be used for any database that may need to be restored, even custom databases.
- A machine with MySQL installed
- Copies of the following files from a the Backup Ephesoft Folder:
[Path]\Ephesoft\Dependencies\MySQL Server 5.5\data\ib_logfile0 [Path]\Ephesoft\Dependencies\MySQL Server 5.5\data\ib_logfile1 [Path]\Ephesoft\Dependencies\MySQL Server 5.5\data\ibdata1
- Root password for the backed up database
- Backup the the current ib_logfile0, ib_logfile1 and ibdata1 on your MySQL machine. These will be located in the “[Path]\MySQL Server 5.5\data\” directory.
- Ensure MySQL service is stopped in the Windows Services. If this instance was installed by Ephesoft, the service name will be Ephesoft MySQL Server 5.5.
- Copy original back up files to the “[Path]\MySQL Server 5.5\data\” directory. Overwrite the existing files.
- Start the MySQL service in Windows Services.
- Open a command prompt windows (Start > Run > cmd.exe).
- Run the following command:
- mysqldump -uroot -p[root password] [database name] > [output file name].sql
- [root password] = root password for the backed up database
- [database name] = database name to dump
- [output file name] = name of the script file you want to create. ensure it ends with the .sql extension.
- Copy the database dump script to the computer which needs the database.
- Enter the following command to restore the database:
- mysql -h localhost t -u root -p < [database dump script]
- [database script dump] = script name for the database dump script
- Enter the new root password (the root password entered during the new install).
- Close the command prompt.
- Restart the Ephesoft service/application.
- Be sure to restore the original ib_logfile0, ib_logfile1 and ibdata1 on your MySQL machine by running through steps 2 through 4 of the procedure. The only difference is that you will be using the backups you made in step 1.
- Ensure that Ephesoft software/web site is running.