MySQL – How to Import Only Schema from Full Dump

MySQLmysqldump

I have a full database export (single file, schama + data), but I would like to import only the database schema. Is there any magic option or trick to achieve this?
I'm NOT able to perform a "mysql_dump –no-data" at the original database at this moment. Is removing all inserts and updates manual (awk/grep/vim) from the dump file the only option?

Best Answer

A mysqldump is only inserts, not updates. So grep -v "^INSERT" dump.sql should be sufficient. Take a look before using