Difference between revisions of "ISFDB:MySQL Only Setup"

From ISFDB
Jump to navigation Jump to search
(More MySQL installation details)
Line 27: Line 27:
 
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.
 
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). [[User:Ahasuerus|Ahasuerus]] 23:18, 10 Sep 2006 (CDT)
+
5. Depending on how fast your computer is, it may take a few minutes 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). [[User:Ahasuerus|Ahasuerus]] 23:18, 10 Sep 2006 (CDT)

Revision as of 20:52, 15 May 2008

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:

Install MySQL

You will need to 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. You can build from source or you can download rpms. If you are downloading rpms, you will need the following:

  • Server - This includes the MySQL daemon, which is where the database itself resides.
  • Client - This is the command-line client that allows you to make direct queries or to modify the database structure.
  • Headers and libraries - These are need to compile and link remote applications - like the ISFDB.

Download an ISFDB Data File

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.

Load the ISFDB Data File

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, it may take a few minutes 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)