Creating MySQL Databases
Peter Reid
preid at reidit.co.uk
Sun Mar 20 12:49:40 EST 2005
I'm just starting a project using MySQL for the first time. Having
looked at the Rev 2.5.1 documentation, I'm happy enough that I can
access and update MySQL databases as required. However, what I can't
see is how I can create and carry out basic administration of NEW
databases.
My project involves my users being able to create a new database to
support work for a particular client. Each new database will be
based on a template database which consists of 23 tables - 17
pre-loaded with standard data and 6 empty tables that will hold
client-specific information during use. The MySQL server will be
running on a networked Mac OS X system (possibly Server X 10.3, but
also possible just standard OS X 10.3), accessible to all users
within the organisation.
Using phpMyAdmin, YourSQL and MySQL 4.0.24 (under Mac OS X 10.3.8),
I've been able to create a template database with all the tables and
standard data in place.
However I can't see how I can code in Rev to carry out basic database
administration:
- create new database (as a copy of a template database)
- rename a database
- delete a database
- dump a database
- reload a database from a dump
Obviously, I could send a series of shell commands, using MySQL in
batch mode. However, why I can't I do the above using the Rev
database library? Also, if I have to use the shell function, how can
I do this to the MySQL server running on a different system over the
local network? (i.e. the program is running on one system whilst
creating and managing a database on a different system across the
local network).
Note that whilst I can use phpMyAdmin to do all the database admin,
my users CAN'T! They need simple "Create DB", "Rename DB" type
actions, which is why I'm trying to include these in my Rev project!
Any advice, help please?
Peter
--
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
E-mail: preid at reidit.co.uk
More information about the use-livecode
mailing list