MySql export schema without data
Solution 1:
You can do with the --no-data
option with mysqldump command
mysqldump -h yourhostnameorIP -u root -p --no-data dbname > schema.sql
Solution 2:
Yes, you can use mysqldump
with the --no-data
option:
mysqldump -u user -h localhost --no-data -p database > database.sql
Solution 3:
you can also extract an individual table with the --no-data
option
mysqldump -u user -h localhost --no-data -p database tablename > table.sql