MySQL: How to ignore errors when importing data?

Recently, I faced an issue while importing data to MySQL. Here are the steps that help me to solve and ignore the error. Read more: show progress on MySQL DB Import

Use the –force (-f) flag on your MySQL import. Rather than stopping on the offending statement, MySQL will continue and just log the errors to the console.

For example:

mysql -u userName -p -f -D dbName < script.sql

Read More: MySQL Export query to SQL file : mysqldump

Leave a Reply