Uh-oh! Unable to start site - mysqld.sock

What issue or error are you experiencing?

Good afternoon, let’s see if someone can help me. Activating XDebug, the computer turned off and when I restarted I could not access that specific site. The alert I get is this:

" Uh-oh! Unable to start site
Error: Command failed: /Users/juananaya/Library/Application Support/Local/lightning-services/mysql-5.7.28+4/bin/darwin/bin/mysqladmin ping

mysqladmin: connect to server at ‘localhost’ failed

error: ‘Can’t connect to local MySQL server through socket ‘/Users/juananaya/Library/Application Support/Local/run/HDuhI84sG/mysql/mysqld.sock’ (2)’

Check that mysqld is running and that the socket: ‘/Users/juananaya/Library/Application Support/Local/run/HDuhI84sG/mysql/mysqld.sock’ exists!

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 Socket. (node:internal/child_process:449:11)

at Socket.emit (node:events:513:28)

at Socket.emit (node:domain:489:12)

at Pipe. (node:net:322:12)
"

Thank you very much in advance.

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


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

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

local-logs.zip (300.6 KB)


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 @JuanAnaya

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 very much Nick, that was the only solution and it worked perfectly. Congratulations on the application, it seems fantastic. The only problem is that I still haven’t managed to get the Live Links to work properly, I don’t see the website correctly through them.

1 Like

Glad to hear it @JuanAnaya

Regarding Live Links, I can share some tips. Live Links don’t match your Local Site URL (ie: mysite.local), so Local attempts to rewrite these on the fly. Live Links is broadly compatible with many themes, plugins, and custom code snippets. However, some images, front-end assets, or other HTML elements may be missing from your site when viewing it over Live Links.

As a first step you can try running a search and replace command to help clean up any mixed content type errors. To do this you can simply click on Open Site Shell in your Local app under your site name. The command would look something like this:

wp search-replace 'SITEURL' 'LOCALURL' --skip-columns=guid

As a tip you would:

You’ll also want to make sure you Trust Local’s SSL certificate, to help avoid insecure content as well.

If you’re still noticing issues, check to see if you have plugins or themes that retain caching or have a “Regenerate CSS” option. These may need to be refreshed in order for changes to be displayed.

There may be other plugins getting in the way as well if they are trying to force SSL/HTTPS.

If you’re still having issues you might open up the console of the page and see what errors are present. Is it still showing some mixed content or some other type of issue?

You might try viewing it in an incognito window, a different browser, or over LTE Data instead of WiFi to see if caching is getting in the way as well.

As another workaround, if you’re still having trouble, you could try pushing the site up to a Demo to see how it looks there. Flywheel offers free 14 day Demos that you could test out: Demo Site