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?
4 Answers 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.
Dump the table structure only using the command below:
mysqldump -d -h localhost -uYourUsername -pYourPassword databasename > dumpfile.sql
Select your database or table.
Select the Export tab.
Below Export method, select Custom.
Below Tables, check the appropriate Structure boxes.
-
Is this a different version of PhpMyAdmin than the one in the accepted answer?András Váczi– András Váczi2016年03月19日 18:14:39 +00:00Commented 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– Leo2016年03月21日 14:39:00 +00:00Commented Mar 21, 2016 at 14:39
mysqldump --no-data big_db_name > big_db_name.structure.sql
-
This is different question, but I think this manual would help top5freeware.com/pscp-examplesvfedorkov– vfedorkov2014年12月14日 20:21:12 +00:00Commented Dec 14, 2014 at 20:21
-
How is this different from the other similar answer?András Váczi– András Váczi2016年03月19日 18:18:04 +00:00Commented Mar 19, 2016 at 18:18