Restoring data into your MySQL database using a backup.sql file

(Last Updated On: October 21, 2015)
  • Save your backup.sql file in the local C:\Tix7\Output folder (this is the default).
  • Bring up a command prompt (DOS) window.
  • Type cd c:\Tix7\Output.
  • Press Enter. Type dir and press Enter. You will get a listing of files. You should be able to figure out the latest backup file.
  • Type the following command exactly as it appears below (except for the name of the SQL file, which will change according to the date it was created), including spaces:
    • mysql -u root -p –database tix7 < WintixBackup_month_date_year (ie. 2012).sql
    • IMPORTANT! What looks like one dash before database tix7 is actually TWO dashes!
  • Hit Enter.
  • The cursor will flash until the restore is done.
  • When the flashing cursor comes back to the C:\Tix7\Output prompt, the restore will be done. Open Wintix and confirm that the data is current and correct.

    Notes:

  • A blank root password is bad security. However, this is the database default.
  • When it asks for your password, press enter (the root password is blank).
  • If you are working on a Linux server, the command and files names are case sensitive.
    If you get a message, “not recognized as an internal or external command” that could mean:
    A) You are not actually on the server.
    B) The MySQL server is not in the path (set up when installing the server). Therefore, you must run the command like this:
    “C:\Program Files\MySQL\MySQL server 5.5\bin\mysql -u root -p –database tix7 < {name of backup file}”
This entry was posted in Desktop Software, General Information, Wintix5 and tagged . Bookmark the permalink.

Leave a Reply