mysqldump – Export structure only without autoincrement
You can do this : mysqldump -u root -p -h <db-host> –opt <db-name> -d –single-transaction | sed ‘s/ AUTO_INCREMENT=[0-9]*\b//’ > <filename>.sql As mentioned by others, If you want sed to works properly, add the g (for global replacement) parameter like this : mysqldump -u root -p -h <db-host> –opt <db-name> -d –single-transaction | sed ‘s/ … Read more