mysqldump schema only code example
Example 1: backup mysql schema only
mysqldump -u testuser -p --no-data testdb > /tmp/testdb_schema.sql
#Syntax:
mysqldump -u [MYSQL_USER] -p --no-data [DB_NAME] > [OUTPUT_FILE]
Example 2: get only structure database mysql
mysqldump -u root -p --no-data dbname > schema.sql