snippetsqlMinor
How can I export just the structure of a MySQL database?
Viewed 0 times
canthejustdatabasemysqlexportstructurehow
Problem
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?
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?
Solution
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"
Next, click the Custom radio button
Halfway down the "Format-specific options" area, select "structure" (the default is "structure and data")
Check the other options and press Go to download your .sql file with no data, only the table structure.
Navigate to the database you wish to export. Across the top row of tabs click "Export"
Next, click the Custom radio button
Halfway down the "Format-specific options" area, select "structure" (the default is "structure and data")
Check the other options and press Go to download your .sql file with no data, only the table structure.
Context
StackExchange Database Administrators Q#86107, answer score: 4
Revisions (0)
No revisions yet.