MySQL – How to Fix Issues Importing .sql File

myisamMySQL

I have a 1.4GB .gz backup file(which is 8GB unzipped) I have to import to the server but it isnt working whatever method I have tried.

1st I tried Workbench, after 2 days and still no progress I canceled, and after some research I found out console was the better option with big files.

On Console I tried importing directly from compressed .gz however that gave me ascii\0 error so I unzipped and tried uploading the file directly. This time it started very fast with some occasional spikes (like some rows gets 0.8 secs but the next row 11.76 secs). But this time it got stuck at the last second. I tried this step with 4 different OS and hardware setups.(Vista,7 server 08 and ubuntu also I tried with dedicated hardware also)

Since the file is big I cant just open it from notepad++ and I read that might corrupt the file also.

I cant get a new backup as the data came from outside source.

The database has 15 coloumns, myISAM engine.

As I can't seem to find anything else I would like some help as to what might be causing this issue.

Thank you very much.

Best Answer

As I said in my comments above your issue comes from a small tmp dir. There are many answers on stackoverflow concerning this. Here is 1

https://stackoverflow.com/a/1067521/716691

And here's how to change mysql tmp dir temporarily without editing my.cnf. Make sure you create a tmp dir somewhere with enough available space.

https://stackoverflow.com/a/21853110/716691