Re: Creating a clean copy or schema backup
Use mysqldump to create SQL code for an empty database template
$ mysqldump -uuser -ppassword --no-data salesLeadsBrittany >salesLeadsTemplate.sql
Then, at the mysql> prompt:
mysql> CREATE DATABASE salesLeadsNormandy;
mysql> USE salesLeadsNormandy;
mysql> SOURCE /path/to/salesLeadsTemplate.sql;
CAVEAT EMPTOR: the above SQL code contains DROP TABLE statements. Do not run it on your production data or in the wrong database unless you are absolutely sure it works the way you want it to work. Make sure you have a working backup of all tables involved before running this code.
--
felix
Please use
BBCode to format your messages in this forum.
Subject
Written By
Posted
November 23, 2006 05:39AM
November 23, 2006 08:48AM
November 24, 2006 04:44AM
Re: Creating a clean copy or schema backup
November 24, 2006 05:05AM
November 24, 2006 08:32AM
December 22, 2008 05:53AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.