Issue:

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.

Purpose:

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.

Prerequisites:

  • 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

Procedure:

  1. 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.
  2. 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.
  3. Copy original back up files to the “[Path]\MySQL Server 5.5\data\” directory. Overwrite the existing files.
  4. Start the MySQL service in Windows Services.
  5. Open a command prompt windows (Start > Run > cmd.exe).
  6. Run the following command:
    1. mysqldump -uroot -p[root password] [database name] > [output file name].sql
    2. [root password] = root password for the backed up database
    3. [database name] = database name to dump
    4. [output file name] = name of the script file you want to create. ensure it ends with the .sql extension.
  7. Copy the database dump script to the computer which needs the database.
  8. Enter the following command to restore the database:
    1. mysql -h localhost t -u root -p < [database dump script]
    2. [database script dump] = script name for the database dump script
  9. Enter the new root password (the root password entered during the new install).
  10. Close the command prompt.
  11. Restart the Ephesoft service/application.

Post Procedure

  • 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.




Was this article helpful to you?

J.D. Abbey

Comments are closed.