HostMonster Web Hosting Help

MySQL dump of tables only, no data


I would like to dump the Table Structure for my MySQL Database, but none of the 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.

Knowledgebase Article 83,058 views bookmark tags: mysql ssh (updated 1640 days ago)

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). (updated 231 days ago)
Knowledgebase Article 332,810 views tags: database mysql ssh

How do I import a database using command line? (SSH) (updated 642 days ago)
Knowledgebase Article 272,420 views tags: command database import line mysql phpmyadmin ssh

Users having problems connecting to mysql database using SSH and/or putty/other client. (updated 1355 days ago)
Knowledgebase Article 52,979 views tags: connection ip mysql putty ssh whitelist

Related Help Content

What necessitates "Database Repair"? (updated 634 days ago)
Knowledgebase Article 74,429 views tags: corruption damaged database mysql postgres repair tables

A step by step guide on how to manipulate data in your mySQL tables using phpMyAdmin (updated 460 days ago)
Knowledgebase Article 16,399 views tags: databases mysql phpmyadmin

Guidance on adding tables to your mySQL database in phpMyAdmin (updated 460 days ago)
Knowledgebase Article 8,149 views tags: mysql phpmyadmin

An exported .sql file shows as a different size than the reported size in cPanel (updated 1047 days ago)
Knowledgebase Article 18,812 views tags: backup database dump export mysql mysqldump size sql

How to repair and optimize your database using phpMyAdmin: (updated 653 days ago)
Knowledgebase Article 111,399 views tags: database mysql optimizing repairing slow speed

Instructions on deleting tables from your database using phpMyAdmin (updated 461 days ago)
Knowledgebase Article 12,988 views tags: Plesk cpanel databases mysql phpmyadmin

I need to Export or Import a MySQL database (updated 230 days ago)
Knowledgebase Article 160,738 views tags: mysql phpmyadmin ssh

This article will explain MySQL database and user creation and deletion, and explain how to assign a user to a database. (updated 447 days ago)
Knowledgebase Article 310,757 views tags: creation database mysql