sqlmysqldatabasedatabase-schemadump

Export schema without data


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?


Solution

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

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