Cannot Open Local Site

What issue or error are you experiencing?

When trying to start the site it says provisioning. Then comes up with this error.
Uh-oh! Unable to start site.
Error: Command failed:
C:\Users\DionV\AppData\Roaming\Local\lightning-services\mysql-8.0.16+…\mysqladmin.exe
ping
Dmysqladmin: connect to server at ‘::1’ failed
error: ‘Can’t connect to MySQL server on ‘:1’ (10061)’
Check that mysqld is running on :1 and that the port is 10059.
You can check this by doing 'telnet ::1 10059"
at ChildProcess.exithandler (node:child_process:430:12)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5)

What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

All of the other sites seem to be working well. I have tried telnet in command prompt to se if the port is operating and got this response:

Connecting To ::1…Could not open connection to the host, on port 10059: Connect failed


System Details ntel(R) Core™ i7-1065G7 CPU @ 1.30GHz 1.50 GHz

  • Local Version: Version 8.1.0+6514

  • Operating System (OS) and OS version: Windows 11 Home


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @DionV

If you create a new, blank site in Local can you access that okay? If you can, then you may want to try reimporting the site getting the errors. The steps would look like this:

  • Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
  • Once you have those copied, completely delete the site from Local
  • Restart Local/your machine
  • Reimport the site back into Local. You can refer here on how to Restore from only Local site files

Thank you @Nick-B for your help. I have followed those steps but after the import all of my content-media-pages etc are missing?
Any ideas?

Are they just missing from the media library or have you tried locating them in the site files manually and don’t see them there either?

If you look at the files in the copy of your site that you made can you locate them in there to import over manually?

They are missing from the media library. The pages and templates that I created are also missing on the site?

Are you able to tell me how to import manually. I copied the content folder over to the local site location but no difference?

On this help article we have instructions under item #2 to manually import a site by moving over the specific files individually or #3 would be bundling up your files into a zip to import.

Thanks again, yes i zipped the entire contents of the folder and imported the site but nothing is there. Perhaps i can try it all again

If you unzip that file and inspect the contents do you see your site’s content in there? If so you can use the #2 steps from that article to manually try moving things over.

Hi again, i have tried the above. The issues seems to be with importing the database. When i go to site shell and try wp db import your-database-filename.sql I get this error:
Error: Failed to get current SQL modes. Reason: ERROR 2003 (HY000): Can’t connect to MySQL server on ‘localhost’ (10061)

Hi @DionV

Do you have any antivirus, security, or firewall applications that could be blocking Local?

Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.

If nothing else is conflicting that you are aware of, make sure you’ve saved all the site files and DB and then you could try an uninstall/reinstall to see if things work afterward. The steps would be like this:

  • Export any sites that you have on Local and save them to a folder somewhere on your computer.

  • Fully uninstall Local from your computer.

  • Install the latest version of Local on this link.

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log. Retrieving Local’s Log File

Keep us posted and we’d be happy to help further!

Still no success… here is the log file.

https://1drv.ms/u/s!AjpD0iDOlBDmgbtR-LMeiI0taMPpSQ?e=ZAgI5g

When you say still no success do you mean importing the DB? You get the same error? Or can you not create a site at all?

Yes that is correct still the same DB error. I have numerous other sites in local with no issues at all just this one. I have disabled all firewalls, antivirus etc. Reinstalled Local twice and added the site directly from the files at least 5 times with no result. Looks like a rebuild so disappointed. Have just installed the cloud backup add-on. Hoping to not face this issue again. I don’t know what else that i can do to bring back the work.

Hi @DionV - I’ll send you a DM here to follow up

Ok, Thank you

I have the same issue, do you have a fix?

Unfortunately No! Site rebuild. Have added the cloud backup add on hoping to avoid the same thing again.

Hi @Ehelton

Are you able to create a new blank site in Local? Is it just previous sites that throw that error?

Do you have any add ons enabled?

Somehow after leaving local open for several days (site not running), after a restart of the local application today my site is working again. It does give a banner message “Warning! This site’s WordPress URL settings do not match the host set in local” but seems to be functioning like it was.

2 Likes