Welcome to WebmasterWorld Guest from 54.197.66.254

Forum Moderators: open

Message Too Old, No Replies

Copy Schema without Data

possible in mySQL

     
9:09 pm on Jan 27, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


I'm using mySQL 5.X and was wondering if there was a way to copy all the tables from a schema without copying all the data with one command.

I'd like to rebuild the schema, but don't need all the data, and don't want to recreate all the tables again......

9:23 pm on Jan 27, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 22, 2002
posts:1782
votes: 0


Hi txbakers, you can use
mysqldump
[dev.mysql.com] with the
--no-data
option. This will create just the DDL statements for the tables you specify without any data.
1:24 pm on Jan 29, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Sept 1, 2001
posts:4392
votes: 0


---- excellent -----

thanks.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members