MSQLD(8)

NAME
msqld - Mini SQL Database Engine

SYNOPSIS
msqld

DESCRIPTION
The mSQL daemon, msqld, is a standalone application that listens for connections on a well known TCP socket. It is a single process engine that will accept multiple connections and serialise the queries received. It utilises memory mapped I/O and cache techniques to offer rapid access to the data stored in a database. It also utilises a stack based mechanism that ensures that INSERT operations are performed at the same speed regardless of the size of the table being accessed. Preliminary testing performed by a regular user of mSQL has shown that for simple queries, the performance of mSQL is comparable to or better than other freely available database packages. For example, on a set of sample queries including simple inserts, updates and selects, mSQL performed roughly 4 times faster than University Ingres and over 20 times faster than Postgres on an Intel 486 class machine running Linux. The server may be accessed either via a well known TCP socket or via a UNIX domain socket with the file system (/var/run/msqld/control). The availability of the TCP socket allows client software to access data stored on machine over the network. Use of the TCP socket should be limited to client software on remote machines as communicating with the server via a TCP socket rather than the UNIX socket will result in a substantial drop in performance. See the details on the programming API libmsql(3) and also the command line options to standard programs for details on selecting the server machine. Mini SQL provides a subset of ANSI-SQL, see msql(5) for details. By default msqld listens on port 1112 if it runs under the root uid and on port 4333 if it runs under a defined user. The Debian Linux release of msqld runs under the special uid ``msql'' and listenes on port 4333 by default. You can control this behaviour by configuring it using msqlconfig(8) or by editing /etc/msql.acl.

ENVIRONMENT
The mSQL family may be controlled by some environment variables. They override compiled-in default values but may be overridden by commandline arguments.

MSQL_TCP_PORT
    Specifies the TCP port on which the database engine listen to requests.

MSQL_UNIX_PORT
    Specifies the unix domain socket that shall be used to contact the engine if it runs on the local host.

MINERVA_DEBUG
    Specify debuging. See section DEBUGGING for a list of possible values.

DEBUGGING
The engine includes debugging code so that its progress can be monitored. There are currently 8 debugging modules available in the engine. Debugging for any of the available modules can be enabled at runtime by setting the contents of the MINERVA_DEBUG (configured via msqlconfig(8)) environment variable to a colon separated list of debug module names. A list of available debug modules is given below:

cache
    Display the workings of the table cache.

query
    Display each query before it is executed. This is very useful especially if you're programming an appliction but queries fail.

error
    Display error messages as well as sending them to the client.

key Display details of key based data lookups.

malloc
    Display details of memory allocation.

trace
    Display a function call trace as the program executes.

mmap
    Display details of memory mapped regions.

general
    Anything that didn't fit into one of the above categories.

Debug output is stored in /var/log/msql/msqld.$pid.

FILES

/etc/msql.acl
    Main configuration file for the engine, modified via msqlconfig(8).

/var/log/msql/msqld.$pid
    Output of the engine, also mailed if mails are not suppressed.

AUTHOR
Mini SQL has been written by David Hughes of Bond University, Australia as part of the Minerva Network Management Environment. He may be reached via electronic mail using bambi@Bond.edu.au.

SEE ALSO
msql.acl(5), msql(5), msqlconfig(8), libmsql(3).