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
  • Why don't you create the mysqldump without the tables you don't want overwritten ? See my post http://dba.stackexchange.com/questions/9306/how-do-you-mysqldump-specific-tables/9309#9309 – RolandoMySQLDBA Jun 10 '14 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 Jun 10 '14 at 13:31

1 Answers1

1
--ignore-table=my_db_name.my_table_name my_db_name > dump.sql
MDCCL
  • 8,520
  • 3
  • 30
  • 61
Pankaj
  • 11
  • 1