ISFDB:MySQL Only Setup

From ISFDB
Revision as of 20:05, 15 May 2008 by Alvonruff (talk | contribs) (New page: If you are not interested in setting up a local ISFDB website, and instead simply want the ability to query the MySQL database or to run customized scripts, then follow these instructions...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

If you are not interested in setting up a local ISFDB website, and instead simply want the ability to query the MySQL database or to run customized scripts, then follow these instructions:

1. The data backup files are named YYYYMMDD.gz, where YYYY is the year, MM is the month, and DD is the day. Download the file and rename it "backup.gz". Uncompress the backup file. If you are using Unix, then just type "gunzip backup.gz" at the UNIX prompt. If you are using Windows, then you need to get an unzipping program that can handle the ".gz" format first. A number of shareware and freeware programs are available, including IZArc.

2. Download MySQL if you don't have it already installed. Some UNIX distributions come with MySQL pre-installed, but you can always get the latest version at http://www.mysql.com. The current no-frills Windows version of MySQL can be downloaded from one of the mirrors listed here. Follow the installation instructions and accept all the defaults. The only parameter that you will have to create on your own is the password for the main MySQL account.

3. Start MySQL. Under UNIX, type "mysql" at the UNIX prompt. Under Windows, pull up the MySQL console from the Windows Start menu. Enter the password that you created above. If you are installing the database for the first time, proceed to the next step. If you are refreshing your copy of the database from a more recent backup file, type the following at the MySQL prompt:

mysql> drop database isfdb;

4. At the MySQL prompt, type:

mysql> create database isfdb;
mysql> connect isfdb;
mysql> source backup;

Note: include the name of the directory where the "backup" file resides in the "source" command above. Use forward slashes ("/") as subdirectory separator characters under Windows.

5. Depending on how fast your computer is, will take a minute or two for the backup data to be imported into your MySQL database and appropriate tables to be generated. From that point on, you should have a full copy of the ISFDB database except for user-specific data (passwords, e-mail addresses, etc). Ahasuerus 23:18, 10 Sep 2006 (CDT)