Code
MySQL Schema Generation Script
2009-01-27 19:33:25
I created this short PHP script to generate a complete set of SQL commands to recreate the database and table structures within that database. To make use of the script, simple enter in the mysql server, the mysql user name and password and the particular database you wish to create the schema definitions for. Then run the script by executing the following at the command line:
#> php regenerate_sql.php
The SQL statements will then be outputted to the screen. If you wish to capture these into a text file, you can do so by :
#> php regenerate_sql.php > ./db_schema.sql
Files
sql_regeneration.tar.gz
