Friday, 20 March 2009

Export the DB Schema ONLY


To dump the database SCHEMA only, without dumping any actual data :



mysqldump --no-data --tables -u YOUR_USER_NAME -p DATABASE_YOU_WANT_SCRIPTED >> FILENAME.sql

Actual example:



mysqldump --no-data --tables -u larry -p contacts >> contacts.sql

If you want the data to be exported, omit the ”–no-data” portion.



No comments:

Post a Comment