The "database has gone away" is usually indicative of the server crashing, check your mysql logs /var/log/mysqld.log or if not there run;
SELECT * FROM GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'LOG_ERROR';
I've never had a client disconnect, even in week long runs over the network. It looks like your connecting locally so a disconnect is very unlikely.
If you want to resume, you can do the following;
- Check the error log to see the cause of the error and fix this first
- Grep the dump file; grep -irH 'DROP TABLE'
- Compare the tables restored to the grep results; note the line of the last match
- Create a new file from the last matched db (inclusive); tail --lines=+10000 database.sql > resume.sql
- OR; as someone else stated, use the ignore-lines option in mysqlimport
Hope this helps