APM: perl or shell script to generate MySQL db
Wayne Walker
wwalker at broadq.com
Sun Jun 22 21:13:27 CDT 2003
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
--
Wayne Walker
www.broadq.com :) Bringing digital video and audio to the living room
More information about the Austin
mailing list