Error: Local was unable to import the following SQL files:

I do daily backups of a website. Until the 17th of september I can import the website with his database without any problem. After this date I can’t import the database. I have an error :

“Error: Local was unable to import the following SQL files”

I’ve imported an another website without any problem.

I use Local 5.8.2+4949

I’m not sure if the problem comes because of Local or my backups ?

I’m on macOS Catalina.

I also have Local by Flywheel installed on my computer, but it is not running.

Thank you for your help.

Hey @valer1e, Welcome to the Local Community Forums!

It’s hard to say what the exact reason the SQL file can’t be imported. There’s probably more info in the Local log – Can you please provide it? See this Community Forum post for instructions on how to do so:

Hi Ben, thank for your help. Here is the local log.local-lightning.log (402.7 KB)

Hi Ben, I’m not sure if you saw my reply below…

Hey @valer1e

I’m seeing within that log a line that looks like this:

  "thread": "main",
  "class": "h",
  "stack": "Error: ERROR 2006 (HY000) at line 294282: MySQL server has gone away\n    at h.<anonymous> (%%appPath%%/main/importer/Importer.js:1:8528)\n    at (<anonymous>)\n    at a (%%appPath%%/main/importer/Importer.js:1:124)",
  "level": "error",
  "message": "Unable to import /Users/valerie/Local Sites/projeteurs/app/sql/pklb_new_website.sql",
  "timestamp": "2020-10-12T11:43:19.296Z"

Usually with a message like MySQL server has gone away something is causing MySQL to crash.

That line number of at line 294282 is fairly high – that’s over 1/4 of a million lines within the sql dump!

You might try viewing that specific line and the lines around it to see if it’s trying to do something crazy.

But it might also be that this site’s db is getting too large for it to be cleanly imported. How large is that SQL file?

The DB is 145Mo.
I’ve tried on an other computer, no problem.
However, thank you for your help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.