Log in

View Full Version : Database installer


Fridgecritter
02-26-2008, 05:54 AM
A lot of people I noticed are having trouble installing their database either through the console via cmd prompt, or through Navicat (takes much longer btw). I decided to make a simple batch script that looks for 2 files in the same directory as the batch file with the name "load_user_tables.sql" and "load_system.sql" then sources them. You can change the name of the databases it looks for if you want as well, but I find it easier just to edit this batch file once, and change the name of the .sql files to match since the version of the database always changes.

Don't forget to change the path to your MySQL bin in the script too. The default is set to C:\mysql\bin because that's where the tutorial on this forum recommends to install it.

You will have to right click on the batch file and click "edit", then change the values to match your database, but then all you have to do is double click and follow the prompts on the screen. It will backup your database first, and put a file named peq_backup.sql in the same directory that you run it in.

http://www.fridgecritter.com/database_installer.rar

As always, comments and constructive criticism is appreciated.