Dump MySQL Database Schema

You may need to make a development or blank copy of a database driven project for your programmer. Maybe the data is very large and making a full copy would take too long. Maybe you don’t trust your coder with your sensitive data. Whatever the reason the easiest way to make a fresh copy of the database is a schema dump. This is a sql dump that will re-create all of the tables found in your database without populating them with the data in your database. It’s very easy to get such a dump.

Just run:

mysqldump --no-data --tables -u root -p database_name_here > /root/database_name_here_schema.sql

You will be prompted for your mysql root password. You can use different user as well.

This entry was posted in MySQL. Bookmark the permalink.

Leave a Reply