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 in your servers?

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

Do you provide PostgresSQL for your accounts?

Yes. We do provide PostgresSQL interface for all cPanel users.

What is the Maximum MySQL connections limit?

We have no limit for MySQL connections.

What Version of MySQL are you running?

We run the latest stable version of MySQL 5.

How do I import a database (PhpMyAdmin) from a .sql file?

1.  First log in to your Cpanel 2.  Click MySQL  Databases...