How do I dump the table structure for my MySQL Database, but none of the data?

The command line option from SSH is:

mysqldump -d -u -p database_name > file.sql

Where "database_name" is the name of your database, and "file.sql" is the name of the file you would like to write the table structure to. It will prompt you for a password (-p) and this is required. Normally mysqldump gives you the entire database, with the "-d" option, you tell it to not include the data, but just the table structure.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Do you allow remote MySQL access into your servers?

Yes, to manage your databases remotely you will need to add an "access host" via the MySQL...

How do I connect to my database using a program?

If you wish to administer your database from your own computer, via a program like navicat or...

How do I create a MySQL back-up?

To create a MySQL backup follow these simple steps: First log in to your Cpanel Click...

How do I create an empty MySQL database?

To create an empty MySQL database follow these steps: First log in to your Cpanel Click...

How do I grant permissions to cPanel for my MySQL database administrator without giving them the domain password?

There is no way to grant them permission with cPanel. You can only create user/pass and...