Obscure mysql error when trying to start site

Thanks for these logs @joelclimbsthings !

One thing that stands out to me are a number of lines that look like:

{"class":"SiteProcessManagerService","level":"error","message":"Unable to start site.","stack":"Error: Command failed: %%userDataPath%%/lightning-services/mysql-8.0.16+6/bin/linux/bin/mysqladmin ping\n\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Can't connect to local MySQL server through socket '%%site.runData%%/mysql/mysqld.sock' (2)'\nCheck that mysqld is running and that the socket: '%%site.runData%%/mysql/mysqld.sock' exists!\n\n    at ChildProcess.exithandler (node:child_process:422:12)\n    at ChildProcess.emit (node:events:517:28)\n    at maybeClose (node:internal/child_process:1098:16)\n    at ChildProcess._handle.onexit (node:internal/child_process:303:5)","thread":"main","timestamp":"2024-07-03T15:23:35.142Z"}

Note that path of:

'%%site.runData%%/mysql/mysqld.sock' (2)'

That almost seems like there was a mysqld.sock file already there for the site.

Does this error show even when creating new sites?

You can also verify that those .sock files are cleaned up correctly by:

  1. Stop all sites and quit Local
  2. Open a terminal and run the following find command to see if there are any of those files in Local’s “run” folder:
find ~/.config/Local/run -name 'mysqld.sock*'

If that returns any files, even with Local stopped, that indicates that something wasn’t cleaned up correctly. Could you try deleting those files and then starting Local again?

The only other thing that looks odd to me are lines like this:

{"class":"Process","level":"warn","message":"nginx: [emerg] bind() to [::1]:10005 failed (99: Cannot assign requested address)","process":"nginx","thread":"main","timestamp":"2024-07-03T15:23:28.568Z"}

I’m not 100% sure, but I think that Local mostly uses IPv4, so the presence of an IPv6 string ([::1]) hints that maybe there’s an issue with how DNS is resolving and obtaining ports.

Out of curiousity, you mention running Ubuntu – What version is used, or is this an Ubuntu derivative like Pop_OS?