Creating Local site by Importing from WPEngine fails with database connection errors

Issue Summary

I want to download a WPE site into Local for development. The initial connection succeeds and appears OK but an error dialogue is displayed saying:

Can't connect to local MySQL server through socket Check that mysqld is running and that the socket: exists!

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    This is the first time that i have tried to download the site from WPE directly into Local. I do have other sites is Local and do not have issues with them.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    yes, I can


Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

  1. Display a list of sites using Hosts panel
  2. Select a site for download
  3. Instruct the process to merge into an existing site folder
  4. After a moment, a warning dialog appears telling you there is an SQL connection error.
  5. The error can be found in the logs

System Details

  • Which version of Local is being used?

    • v5.10.3
  • What Operating System (OS) and OS version is being used?

    • MacOS 10 Catalina
  • Attach the Local Log.
    local-lightning.log (24.6 KB)

Hey @budasy

There’s a couple of errors in the Local log that are interesting to me:

{"thread":"main","class":"DevKitService","message":"packet_write_wait: Connection to port 22: Broken pipe\r\n","level":"warn","timestamp":"2021-04-07T02:32:21.610Z"}
{"thread":"main","class":"DevKitService","message":"rsync: connection unexpectedly closed (10241743 bytes received so far) [receiver]\nrsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.3]\n","level":"warn","timestamp":"2021-04-07T02:32:21.611Z"}
{"thread":"main","class":"DevKitService","message":"rsync: connection unexpectedly closed (181130 bytes received so far) [generator]\nrsync error: unexplained error (code 255) at io.c(226) [generator=3.1.3]\n","level":"warn","timestamp":"2021-04-07T02:32:21.612Z"}

the Broken pipe\r\n part makes me think that there was a network connection issue. A couple of things come to mind that you can try to troubleshoot:

  1. Can you connect directly to the network using an ethernet cable, or move to a stronger wifi signal?
  2. Can you navigate to WP Engine’s dashboard and download a backup of the site? From there, drag-and-drop the site zip file onto Local to manually import it.

One thing to consider – does this site have a large DB? That could be a reason for things taking a while to complete.

I’m glad to hear that it may be a connectivity issue. Unfortunately the network is undergoing change, so while we wait for the fibre cables to be connected, we’re relying on wifi coming in from a pole across the road.

I have already undertaken the first part of step 2, so I’ll complete that.

The DB is reasonably big and it’s part of the reason we are looking at the site.

thanks for your responses @ben.turner. I’ll mark this the solution.

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