I am having a mysqldump file which contains schema as well as data dump.
I need to import only database schema from my sqldump. I tried with following command:
mysql -uUSER -pPASSWORD < filename.sql
but of no help. it imports both schema as well as data.
How can I do it?
Just in case you don't want to dump everything again and you just need it for some quick tests you could also cheat very dirty by using
grep -ve '^INSERT' dump.sql > dump-no-data.sql
Don't use this for production environments though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With