Tell me, please, how to import only the structure of the Mysql database, and not the data itself, in order to fill it with a clean sheet? Show me where to read about it, if you don’t say a few words. Thank.

  • and what is bad to import with data which then to clear? - oneboy
  • and if there 50tb? - Gorets pm
  • 2
    Is it not possible through phpMyAdmin? There, when exporting, there are parameters: either structure, or data, or structure and data - Deonis
  • 2
    If through the console mysqldump, then with the key --no-data will get a backup copy of only the structure. - KiTE 2:19 pm
  • one
    In addition to the @KiTE comment - read more about this - Deonis 2:22 pm

2 answers 2

Import in a place with data, and then, when exporting via phpmyadmin, look at the "Save Table" item in the "Format Parameters" section.

    You can create a database structure without data through the console:

     mysqldump --no-data - u USER -p DATABASE > /path/to/file/dump.sql 

    and then pour:

     mysql -u USER -p DATABASE < /path/to/dump.sql