SQL is a powerful database processing package.Backing Up Your DatabaseWe provide setup support for mini-SQL in several versions (mSQL 1 and MySQL). Note we provide no techical support beyond setup. You must be fluent and educated in database and SQL languages yourself to take advantage of mSQL's features. Database programming is very specific and should not be entered into lightly.
MSQL databases can be accessed via PHP (probably the most widely used method), MsqlPerl, or via the mSQL prompt via telnet. PHP is a server-side processing languages which works very well in conjunction with mSQL databases. See the PHP handbook for documentation and command syntax.
We have to create the database for you. Just send us some email or fax a quick letter requesting that a database be setup and any special configuration requests. Your database name will correspond to your domain name. For instance, if your domain name is hithere.com your database will be names hithere. There is NO CHARGE for initial database setup.
mysqldump -hdb#.pair.com -uUsername
-pPassword Username_Database Table >
Backupfile
where:
# = the pair database server number
Username = login name for the database
Password = password for the database
Username_Database = name of your database
Table = table name; optional
Backupfile = the file the database (or table) will be saved to; doesn't
need to exist before you run this command
Other Information:Intro to PHP
- PHP/FI HANDBOOK
- mSQL Library -- at Hughs Technology
- MySQL Documentation
PHP is a powerful, flexible, cutting-edge server-side processing language. It is an aggressively-maintained, well-known, and widely-supported freeware package. One of its most popular uses is as an interface to mSQL. We currently support PHP version 3 and PHP version 2.Extra Info on mSQL:PHP will automatically process any file that ends with the extension .phtml (for version 2) or .php3 (for version 3). For security reasons, it will not process files that end with any other extension.
For further information on using PHP, please visit the PHP homepage.
To access mSQL through the telnet prompt
type msql [database] where "database" is the name of your database.----
After we have created your database, you can then manipulate the tables how you want to. It's usually easiest to do by using text files and passing them to the database, like so:Text file textfile.sql containing:
create table tablename ( name char(40), address char(40), id_number int) \gand passing to mSQL by issuing the command:msql databasename < textfile.sql
Much easier than that clunky mSQL monitor! (No offense to Bambi!)
If you want special access control to your database, then please let us know. We are the ones who must configure the msql.acl file. Want to do a quick and easy backup of your database? Use msqldump! Just follow these steps:
Run the command msqldump databasename > filename.dump. This creates a flat ascii file with all of the commands necessary to totally recreate your mSQL database. (If you just run msqldump databasename without directing it to a file, then it echos to the screen! Yuck, yuck, phooey, phooey!)
You can use this for a daily backup, delete or manipulate your tables, whatever. As long as you have this ascii file, you're OK.
If you are experiencing problems with a table (key fields not working properly, spaces inserted into integers, etc.), then you can run an msqldump, delete the current structure, and feed the data back in with the command
msql databasename < filename.dump. All better now!Sample Msqldump for Database TEST#
# mSQL Dump (requires mSQL-1.0.6 or better)
#
# Host: localhost Database: test
#--------------------------------------------------------
#
# Table structure for table 'TABLE01'
#
CREATE TABLE TABLE01 (
she CHAR(32),
him CHAR(32),
three CHAR(32)
) \g
#
# Dumping data for table 'TABLE01'
#INSERT INTO TABLE01 VALUES ('Anna','Franz','Otto')\g
INSERT INTO TABLE01 VALUES ('Sabine','Thomas','Pauline')\g
INSERT INTO TABLE01 VALUES ('Jane','Paul','Jah')\g#
# Table structure for table 'TABLE02'
#
CREATE TABLE TABLE02 (
she CHAR(32),
him CHAR(32),
three CHAR(32)
) \g
#
# Dumping data for table 'TABLE02'
#INSERT INTO TABLE02 VALUES ('Anna','Franz','Otto')\g
INSERT INTO TABLE02 VALUES ('Sabine','Thomas','Pauline')\g
INSERT INTO TABLE02 VALUES ('Jane','Paul','Jah')\g#
# Table structure for table 'TABLE03'
#
CREATE TABLE TABLE03 (
she CHAR(32),
him CHAR(32),
three CHAR(32)
) \g
#
# Dumping data for table 'TABLE03'
#INSERT INTO TABLE03 VALUES ('Anna','Franz','Otto')\g
INSERT INTO TABLE03 VALUES ('Sabine','Thomas','Pauline')\g
INSERT INTO TABLE03 VALUES ('Jane','Paul','Jah')\g#
# Table structure for table 'TABLE04'
#
CREATE TABLE TABLE04 (
she CHAR(32),
him CHAR(32),
three CHAR(32)
) \g
#
# Dumping data for table 'TABLE04'
#INSERT INTO TABLE04 VALUES ('Anna','Franz','Otto')\g
INSERT INTO TABLE04 VALUES ('Sabine','Thomas','Pauline')\g
INSERT INTO TABLE04 VALUES ('Jane','Paul','Jah')\g#
# Table structure for table 'TABLE05'
#
CREATE TABLE TABLE05 (
she CHAR(32),
him CHAR(32),
three CHAR(32)
) \g
#
# Dumping data for table 'TABLE05'
#INSERT INTO TABLE05 VALUES ('Anna','Franz','Otto')\g
INSERT INTO TABLE05 VALUES ('Sabine','Thomas','Pauline')\g
INSERT INTO TABLE05 VALUES ('Jane','Paul','Jah')\g