there’s an error trying to connect to or create a new site
What issue or error are you experiencing?
amysqladmin: connect to server at '::1' failed
error: 'Can't connect to MySQL server on '::1:10005' (10061)'
Check that mysqld is running on ::1 and that the port is 10005.
You can check this by doing 'telnet ::1 10005'
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
install latest local on Windows 11
try connect or create a site
System Details
Local Version:
Version 9.2.0+6762
Operating System (OS) and OS version:
Windows 11 Home 24H2
running mysqld we can see the “data” folder doesn’t exist in the mysql installation and the file can’t be written eg [MY-010091] [Server] Can't create test file C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mysql-8.0.35+0\bin\win64\data\mysqld_tmp_file_case_insensitive_test.lower-test
also if we create the “data” folder manually and run mysqld again we then get this error
mysqld: Can't open shared library 'C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mysql-8.0.35+0\bin\win64\lib\plugin\component_reference_cache.dll' (errno: 126 The specified module could not be found.) mysqld: Cannot load component from specified URN: 'file://component_reference_cache'.
there is no “lib” folder within AppData\Roaming\Local\lightning-services\mysql-8.0.35+0\bin\win64
seem to have the same issue. Updated to 9.2.0 on Windows 10, and I can no longer connect. Logs indicate trying to access a file that doesn’t exist with this latest version. Will try to downgrade.
mysqld: Can't open shared library '%%userDataPath%%\\lightning-services\\mysql-8.0.35+0\\bin\\win64\\lib\\plugin\\component_reference_cache.dll' (errno: 126 The specified module could not be found.)
Maybe there’s a better way to do it, but I just ran the 9.1.1 installer, then modified the sites.json file in C:\Users\<user>\AppData\Roaming\Local and replaced all of the 8.0.35 strings with 8.0.16.
Downgrading to 9.1.1 did work for me. Mysql 8.0.35 is broken on Windows in 9.2.0.
Thanks for this info, @jonc. We tested this with Windows 11 without issue, but we’ll look into the missing .dll to potentially add it in an upcoming 9.2.1 update.
Edit: Ended up having some problems after doing the find and replace for the DB version. I had replaced mysql 8.0.35 with 8.0.16 and mysql did not like that. I’ve since upgraded to the Local 9.2.2 release and reverted the mysql version to 8.0.35' in my sites.json` file and things are working again.
Just noting that I experienced the same issue on Windows 10 Pro and jonc’s fix worked for me. Downgraded from 9.2.0 to 9.1.1 (from Releases - Local) and then did a find and replace for the mysql version in sites.json.
Thanks, @dromsey. We have a fix for the “Can’t open shared library” issue coming in Local 9.2.2 (currently in beta, but will roll out to production this month).
I had the same issue. Tried @jonc’s fix. Every site that I had not tried to open with 9.2.0 would start, but the one site I had tried to open with 9.2.0 - call it Site A - still returned the same error.
Tried restarting, Site A still the only one with the error.
Went back into sites.json, found Site A and replaced 8.0.16 with 8.0.35 for just that site - still running Local 9.1.1 - Site A now started fine.
Out of curiosity I upgraded again to 9.2.0, Site A still started fine, but now other sites wouldn’t start. Restarted again, and again the sites that I had previously tried to open, that had returned the error, would now start. Sites that I had not yet tried to open, returned the error.
So, it seems like it’s possible to overcome the error with 9.2.0 by attempting to start each site, getting the MySQL error, restarting the computer, and then the sites will start with 8.0.35 on Local 9.2.0.
Not sure what’s going on here or why it works only if you’ve attempted to start the site once before restarting, and certainly not ideal if you have a lot of sites, but thought it was worth commenting to add this odd quirk that had worked for me.
nope still the same problem creating a new site with mysql 8.0.35
(8.0.16 works)
[Window Title]
Error
[Main Instruction]
Uh-oh! Unable to start site.
[Content]
Error: Command failed: C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mysql-8.0.35+2\bin\win64\bin\mysqladmin.exe --host=::1 ping
mysqladmin: connect to server at '::1' failed
error: 'Can't connect to MySQL server on '::1:10010' (10061)'
Check that mysqld is running on ::1 and that the port is 10010.
You can check this by doing 'telnet ::1 10010'
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
[OK]
Version 9.2.2+6771, with preferred site settings shows the error above after “Starting up site services”
I can test the same on the command prompt C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mysql-8.0.35+2\bin\win64\bin\mysqladmin.exe --host=::1 ping
gives:
mysqladmin: connect to server at '::1' failed
error: 'Can't connect to MySQL server on '::1:3306' (10061)'
Check that mysqld is running on ::1 and that the port is 3306.
You can check this by doing 'telnet ::1 3306'
but go back to my original post. the folders are missing from the mysql repo and therefore the initial mysqld prior to this seems to fail.
so to answer your question, yes those errors are still present for mysqld but don’t show on the Local UI. Only the mysqladmin errors show when it fails to connect to mysqld
I also actually got the same error dialog while trying to start an existing site with mariadb today. Presumably there needs to be some delay before trying to ping to give the service time to start?
[Content]
Error: Command failed: C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mariadb-10.4.32+1\bin\win32\bin\mysqladmin.exe ping
C:\Users\jmp90\AppData\Roaming\Local\lightning-services\mariadb-10.4.32+1\bin\win32\bin\mysqladmin.exe: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (10061)'
Check that mysqld is running and that the socket: 'MySQL' exists!
Local already includes DB connection retry with backoff if it can’t connect early — the message you’re seeing is normally as a result of all of those connection attempts failing, typically when MySQL fails to start on a system.
I plan to review your latest messages again and try to repro — thank you for the reports!