2

Is there any way to skip already created tables while importing ? I am trying to import 2GB of database using command prompt but the operation is aborted by mistake. Now if i will do the import again it will drop each table and create it again, That will take very long time.

I want to skip those tables from import which is already created or can i start it from where it was aborted ? I am using this command

mysql -u root -p my_database_name < db_dump.sql
2
  • Why don't you create the mysqldump without the tables you don't want overwritten ? See my post dba.stackexchange.com/questions/9306/… Commented Jun 10, 2014 at 12:45
  • Or as an alternative to Rolando's suggestion, you could manually go into the db_dump.sql and delete the lines that you don't want - i.e. the relevant tables and their data. I do know that this is a hack, but if it's a once off...
    – Vérace
    Commented Jun 10, 2014 at 13:31

1 Answer 1

1
--ignore-table=my_db_name.my_table_name my_db_name > dump.sql

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.