
dbtool  (Version 0.9.17)
======

dbtool is a shell script allowing easy access to the MySQL database. It is
an interactive user frontend for entering or retrieving data. Main functions
include add, find, change and delete data. Mass mail capability is built in.
Very limited knowledge of the SQL language is required.

The script is named 'db' and starting up is as easy as typing its name at
the prompt:

user@host> db

A database and a tablename may be given as optional parameters:

user@host> db mydatabase mytable

db needs the name of a server with a running mysqld to connect to, a
username and this users password. This information may be coded into the
script as default values (not recommended for the password!) or will be read
from the configuration file '.db.rc'. MySQL will use its own defaults from
system variables or from the '~/.my.cnf' file if no defaults are provided.
The following alternate startup syntax is supported to enable easy access to
different server machines without changing the configuration:

user@host> db mysqlserver mysqluser [mysqlpassword]

db was developed on Linux version 2.2.5 using bash. db is working together
with a patched version of Savio Lam's 'dialog 0.6z' and with MySQL. No
effort has been made to make it transportable to other SQL engines (like
msql) but this might be possible. However, the script depends on the output
format of the mysql client and countless changes would be required to adapt
it to other formats.


Installation:
=============

Unpack and compile the distribution:

   tar xvzf dbtool-0.9.17.tar.gz
   cd dbtool-0.9.17
   make clean
   make db

These steps may be done as an ordinary user. The db script should be run
once (and only once for the first time) as user root when started directly
from the installation directory without installing. If you are paranoid
about doing this you may manually create a directory /var/tmp/db writeable
for all users. That's what the first run would do and what Makefile does if
you do 'make install' as user root. 'db' will refuse to be run as user
'root' except for this very first run for obvious reasons.

When started up for the first time by ordinary users db will create files 
~/.my.cnf, ~/.db.rc and directory ~/.dbtool in this user's $HOME directory.
These files should be edited to enable passwords and access to the mysql 
daemon.

Do 'make install' as user 'root' to install after checking locations in
Makefile.

   su -c 'make install'

This installs the script itself and the patched dialog program under a new
name 'db_dialog' to avoid overwriting existing versions. If you are happy
with my new dialog-0.7 you may change into the dialog-0.7 directory and
'make install' from there to install dialog under its proper name of
'dialog'. The man pages have been adjusted too.

BUGS: for the time update() and delete() require a column of type
      'primary key';
      coding bugs found daily (but fewer all the time).

have fun
Thomas G. Spahni
<thomas@spahni.ch>
