Search code examples
mysqldatabase-administration

How to create mysql database baseline without data


How to create a mysql database baseline without data in it so that we could just use the base line to create another instance??


Solution

  • Create a dump of the schema only:

    mysqldump -d yourdatabase >dumpfile.sql
    

    Import this dump into your new database:

    mysql yournewdatabase <dumpfile.sql