HostGator Web Hosting Help

MySQL dump of tables only no data

The command line option in SSH is:
                 mysqldump -d -u username_user -p username_dbname > file.sql
              
Where "username_dbname" 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.

Click Here for information on requesting SSH access.



Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

This article will instruct you how to export a database from the command line (SSH).
Knowledgebase Article 927,127 views tags: database mysql ssh

This article will instruct you how to import a database from the command line (SSH).
Knowledgebase Article 840,513 views tags: database mysql ssh

A step by step guide on how to manipulate data in your mySQL tables using phpMyAdmin
Knowledgebase Article 240,887 views tags: databases mysql phpmyadmin

Related Help Content

Guidance on adding tables to your mySQL database in phpMyAdmin
Knowledgebase Article 154,346 views tags: mysql phpmyadmin

Database Size and Table Limits.
Knowledgebase Article 260,911 views tags: database limits size tables

How to repair and optimize your database using phpMyAdmin:
Knowledgebase Article 483,603 views tags: database mysql optimizing repairing slow speed

This article will explain MySQL database and user creation and deletion, and explain how to assign a user to a database.
Knowledgebase Article 930,002 views tags: creation database mysql

This article will show you how to rename a database table in phpMyAdmin.
Knowledgebase Article 385,979 views tags: databases mysql phpmyadmin

I need to Export or Import a MySQL database
Knowledgebase Article 457,063 views tags: mysql phpmyadmin ssh

How do I make my MySQL database compatible with the version you provide?
Knowledgebase Article 286,699 views tags: compatible database mysql

This article will explain how to change the password for a database in the event that the original password is lost.
Knowledgebase Article 315,820 views tags: database mysql password