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.

  • 4 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

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.- CSpace Hostings /...

Do you support MS SQL?

No, we do not support MS SQL.- CSpace Hostings / https://cspacehostings.com

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?

1. First log in to your Cpanel 2. Click MySQL Databases 3. Click phpMyAdmin 4. Click Export...

Powered by WHMCompleteSolution