Installing mSQL


mSQL, or Mini SQL, is a lightweight database engine created to allow fast support and access of stored data without requiring large amounts of memory. This database engine provides a powerful capability for accessing databases within the Virtual Server environment.

The mSQL package includes the powerful database engine, a terminal "monitor" program, a database admin program, a schema viewer, and a C language API. The API and the database engine have both been designed to work in a client/server environment over a TCP/IP network. This makes mSQL an ideal database for operating within your Virtual Server.

There is currently no cost for use of mSQL. It is provided to our Virtual Server Administrators free of charge (no installation fee or monthly fees). We have obtained a fully site-licensed version of the mSQL database version 2.0 for our Virtual Servers. Therefore, you need not purchase an individual license to use mSQL on our Virtual Servers.

 


Connect to your Virtual Server via Telnet or SSH run the mSQL v2.0.x installation script that matches your Virtual Server O/S:
FreeBSD
% vinstall msql  
BSD/OS
% installmsql2  
NOTE: If your Virtual Server was ordered after Nov 22, 1999, you are likely running FreeBSD. To find out which O/S your Virtual Server is running, use the uname command:
% uname

The mSQL v2.0.x installation scripts will perform the following tasks:

  •  
  • Copy the mSQL v2.0.x files onto your Virtual Server.
  • Determine if you have msql v1.0.x installed. If you do have msql v1.0.x installed, the mSQL v2.0.x installation scripts will attempt to convert your existing database files to v2.0.x database format. The scripts will not destroy your v1.0.x database directory: ~/msqldb.
  • Create an msql.acl file with some "intelligent" defaults.

mSQL v2.0.x uses different command-line commands than v1.0.x of mSQL. The following table summarizes the differences:

mSQL v1.0.x mSQL v2.0.x
msql msql2
msqladmin msql2admin
msqldump msql2dump
relshow relshow2

Some "aliases" will also be created in your ~/.cshrc file to help you remember. You will need to do the following at the command prompt before these aliases take affect:

% source ~/.cshrc

You only need to do this the first time. When you log in again the changes will be in effect.

Your v2.0.x databases are stored in the following directory, depending on your Virtual Server O/S:

FreeBSD
~/usr/local/Hughes/msqldb
BSD/OS
~/usr/local/msql2/msqldb

If you are upgrading from v1.0.x, you will eventually want to remove the mSQL v1.0.x directory ~/msqldb manually when you are certain the upgrade worked. You can do this by typing the following at a command prompt:

% rm -rf ~/msqldb

Make sure your databases are working correctly before doing this.

Starting mSQL
To start the mSQL daemon use the following command:

% daemon -f /usr/local/bin/msql2d

Notice that a similar command has been added to your RC File (~/etc/rc) to ensure that mSQL restarts in case of a host machine reboot. mSQL runs as a daemon on your Virtual Server. To check on the status of the mSQL daemon, do the following:

% ps auxww | grep msql