MySql export schema without data

Darth Blue Ray picture Darth Blue Ray · May 30, 2011 · Viewed 383.4k times · Source

I'm using a MySql database with a Java program, now I want to give the program to somebody else.

How to export the MySql database structure without the data in it, just the structure?

Answer

Daric picture Daric · May 30, 2011

You can do with the --no-data option with mysqldump command

mysqldump -h yourhostnameorIP -u root -p --no-data dbname > schema.sql