Creating MySQL Databases

Andre Garzia soapdog at mac.com
Sun Mar 20 18:21:47 EST 2005


Peter,

I recommend that you check your SQL database documentation for there 
are SQL function for creating databases and stuff like that. phpMyAdmin 
does nothing but serve as front-end for the MySQL system, all it does 
is to pipe commands to the server. I'll sum some URLs below that point 
to good parts of documentation where you can find what you need:

http://dev.mysql.com/doc/mysql/en/database-use.html    -- This will 
show how to inspect your databases and how to "start using" them.

http://dev.mysql.com/doc/mysql/en/creating-database.html   -- This 
presents the commands to create a database.

http://dev.mysql.com/doc/mysql/en/loading-tables.html  -- this is just 
a "cool" thing to load "raw text files" in your database.

http://dev.mysql.com/doc/mysql/en/backup.html  -- this will cover your 
desires for dumping and restoring :D

Sorry but I did not find anything on renaming databases... but you can 
dump them, change the SQL with a simple replace "oldname" with 
"newname" in the SQLConteainer then, execute that SQL, then delete the 
old database, it will solve your problem....

Also if you're fiddling with SQL and Rev, check Trevor's libDatabase, 
it's an amazing lib.

Cheers
andre


On Mar 20, 2005, at 2:49 PM, Peter Reid wrote:

> 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
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list