APM: perl or shell script to generate MySQL db

jeremy jeremyb at univista.com
Mon Jun 23 09:38:11 CDT 2003


great, thanks Wayne and Evan

-Jeremy

On Sun, 2003-06-22 at 21:13, Wayne Walker wrote:
> Something like this (i didn't check the syntax, read the man page if
> this isn't right)
> 
> mysqldump -u root -p --no-data --all-tables mydatabase > mydatabase_skeleton_create.sql
> 
> on other machine
> 
> echo create database my_new_database | mysql  -u root -p
> 
> mysql  -u root -p my_new_database < mydatabase_skeleton_create.sql
> 
> 
> 
> 
> On Sun, Jun 22, 2003 at 06:58:02PM -0500, jeremy wrote:
> > Hey Mongers,
> >     I've been working on a project based heavily in MySQL/Perl DBI.
> > The databases and tables in them were originally generated with the 
> > script I wrote early on in the project.  Since then, extensive
> > modifications to the tables, and fields have made it necessary  to
> > update the creation scripts.  I'd rather not update the scripts manually
> > by eye-balling the table descriptions.
> > 
> >     MY QUESTIONS ARE:  
> > 1a. Does anyone have a Perl script for accessing a MySQL server,
> > inspecting it's databases and writing out a MySQL script for recreating
> > the same databases, tables and fields?
> > 
> > 1b. Does MySQL 4.0.13 have native support for something like this?
> > 
> > thanks, 
> >    Jeremy
> > 
> >  
> > 
> > _______________________________________________
> > Austin mailing list
> > Austin at mail.pm.org
> > http://mail.pm.org/mailman/listinfo/austin




More information about the Austin mailing list