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
mysqldump can retrieve and dump table contents row by row, or it can retrieve the entire content from a table and buffer it in memory before dumping it. Buffering in memory can be a problem if you are dumping large tables. To dump tables row by row, use the --quick option (or --opt , which enables --quick ).
First, launch the MySQL workbench and log in to the MySQL Server. Second, right-click the database that you want to remove, for example, testdb2 and choose the Drop Schema... option. Third, MySQL Workbench displays a dialog to confirm the deletion.
Run your dump through a filter which replaces each 'CREATE TABLE' with 'CREATE TABLE IF NOT EXISTS', like in
cat db_dump_sql | sed "s/CREATE TABLE /CREATE TABLE IF NOT EXISTS /g" | mysql -uroot -p my_database_name
Or edit db_dump.sql and search/replace interactively.
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