5

I use Ubuntu 14.10 and PhpMyAdmin.

I have a 'big' MySQL database, the size is 900MB. I need just the structure of this database, to use it on my local machine. How can I export the structure only?

0

4 Answers 4

4

Since you specifically asked about phpMyAdmin and the previous answers, while correct, are both about doing this on the command line:

Navigate to the database you wish to export. Across the top row of tabs click "Export"

phpMyAdmin export tab

Next, click the Custom radio button

Custom export type radio button

Halfway down the "Format-specific options" area, select "structure" (the default is "structure and data") Structure/Data/Structure and Data export types

Check the other options and press Go to download your .sql file with no data, only the table structure.

0
3

Dump the table structure only using the command below:

mysqldump -d -h localhost -uYourUsername -pYourPassword databasename > dumpfile.sql
0
1

Select your database or table.

Select the Export tab.

Below Export method, select Custom.

Below Tables, check the appropriate Structure boxes.

phpMyAdmin - Export - Custom - Structure

2
  • Is this a different version of PhpMyAdmin than the one in the accepted answer? Commented Mar 19, 2016 at 18:14
  • Yes @dezso, this is the current version of PHPMyadmin, 4.5.5.1, released 2016-02-29. The accepted answer (Dec 15 '14 at 5:22) is 1 year and 3 months old, for versions 4.3.2 and prior.
    – Leo
    Commented Mar 21, 2016 at 14:39
0
mysqldump --no-data big_db_name > big_db_name.structure.sql
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.