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 132,414 views bookmark tags: mysql ssh (updated 2174 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 763 days ago)
Knowledgebase Article 461,289 views tags: database mysql ssh

This article will instruct you how to import a database from the command line (SSH). (updated 157 days ago)
Knowledgebase Article 429,237 views tags: database mysql ssh

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

Related Help Content

What necessitates "Database Repair"? (updated 1166 days ago)
Knowledgebase Article 102,038 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 994 days ago)
Knowledgebase Article 43,741 views tags: databases mysql phpmyadmin

Guidance on adding tables to your mySQL database in phpMyAdmin (updated 993 days ago)
Knowledgebase Article 16,677 views tags: mysql phpmyadmin

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

This article will explain how to convert a MySQL database to UTF-8. (updated 90 days ago)
Knowledgebase Article 1,540 views tags: character database encoding mysql utf

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

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

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