Unable to start site fails to connect to mysql server

Bug Summary

After closing and reopening Local, it fails to start sites with the error `mysqladmin: connect to server at `::1` failed.

Steps to reproduce

  1. Reboot computer
  2. Open LocalWP
  3. Start a site
  4. Close LocalWP
  5. Open LocalWP and try to start any site

Environment Info

Describe your environment.

  • Windows 11 Home 24H2
  • Nginx, PHP 8.2.27, Wordpress 6.9.1,
  • Local Version 9.2.9+6887

Supporting info

local-lightning.log (12.1 KB)

I have localhost router mode on.

I had this issue a while ago, but it was fixed in version 9.2.2. It has recently resurfaced for me:

Prevent an issue where Local could fail to connect to MySQL on Windows, resulting in a “connect to server at ::1 failed” message after updates.

I have to sign out of my windows user or reboot to get local to work anytime I close it. Happens on multiple computers.

Hey @joejankowiak!

When you’re done working in Local do you generally Stop all of your sites and then quit the application? Some users have found that this helps prevent this error from cropping up.

Another thing you can try is opening the Windows Task Manager and killing any MySQL entries that appear. After that, you can try restarting the site.

Hey @Nick-B you’re always so fast to reply! Generally I have not been stopping sites. I did just try it and if I stop the site before closing and reopening Local it is able to start the site again. If I know I need to reopen local, I’ll start doing this.

I only made a bug report as it seemed like it was fixed when you guys released 9.2.2 as for a few months I haven’t seen this issue. I was just working on that external theme addon which caused me to open and close local a ton so I kept running into this.

1 Like

I’m glad that worked for you @joejankowiak!

We did add some changes to help curb these type of errors which were a lot more frequent before 9.2.2 (notes here Releases - Local)

That said, it’s been tricky to get rid of forever, that’s why I mentioned the workflow to try and avoid it by ensuring things are stopped and closed down each time.

If it continues to crop up or you hit any other snags please keep us posted however!

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