Latest upgrade to v9 breaks connection to MySQL

What issue or error are you experiencing?

Upgraded to version 9 and now Local will not connect with MySQL 8.0.16.

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


System Details

local-lightning-verbose.log (198.0 KB)

  • Local Version:

  • Operating System (OS) and OS version:

Windows 10 Pro

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.

local-mysql error

I have same, and latest update won’t install.

What issue or error are you experiencing?

Sites constantly redownloading MySQL
New update error - can’t close Local (even though it looks like it has closed it), Retry.
Uh-Oh - Unable to Swap Services. Happens on many sites, but they sometimes work if I am logged in


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


System Details

  • Local Version:
    I can’t update. I am on Version 9.0.1+6673
  • Operating System (OS) and OS version:
    Windows 10 Home
    local-lightning.log (329.9 KB)

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 @Barrytron and @mikeyc

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
1 Like

Can you tell me what doing this would tell me? My issue is not isolated to one site.

Essentially what the issue boils down to is something is trying to share or block connections. If the issue was just with one site or a couple of sites then re-importing/cloning them will sometimes overcome this. If the issue is more widespread for you then you can check on a few other things:

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

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

Does changing your router mode make any difference?

If you quit Local, restart your machine and then go back into Local making sure that nothing else is running in the background does that work?

“Do you have any antivirus, security, or firewall applications that could be interfering?” Nothing new or different here.

“Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.”
No. I used to run into issues when I simultaneously was trying to run WAMP (needed to kill ports), but have been using Local for years now exclusively.

“Does changing your router mode make any difference?”
It does not, I tested this this week

“If you quit Local, restart your machine and then go back into Local making sure that nothing else is running in the background does that work?”
I will test this and revert. I want to ensure that pesky Adobe Updater is not up to anything here

Another question - Very often when I start a site up it seems to need to download mySQL again. Are these being stored somewhere?

1 Like

There are lots and lots of entries in your logs like this:

{"class":"Process","level":"warn","message":"2024-05-03T08:51:24.299312Z 1 [ERROR] [MY-012615] [InnoDB] The error means that another program is using InnoDB's files. This might be a backup or antivirus software or another instance of MySQL. Please close it to get rid of this error.","process":"mysql","thread":"main","timestamp":"2024-05-03T08:51:34.299Z"}

Let us know how your further testing goes!

Hi Nick, thanks for your reply. So I deleted a site which was referenced in those logs (InnoDB) and then was able to update. But after update issues seem at least the same. Starting a site, it needs to download MySQL again. Then when that is done, it gives the “Uh Oh Unable to start services”, then “Unable to start site”, then site runs sometimes.
This is the “Unable to swap services” error from log:


{“class”:“SiteProvisionerService”,“level”:“error”,“message”:“Unable to swap services site.”,“stack”:“Error: Command failed: %%userDataPath%%\lightning-services\mysql-8.0.16+3\bin\win64\bin\mysqld.exe --defaults-file=C:/Users/Siobhan/AppData/Roaming/Local/run/sM2J_auAo/conf/mysql/my.cnf --initialize-insecure\n2024-05-23T04:15:59.578789Z 0 [System] [MY-013169] [Server] %%userDataPath%%\lightning-services\mysql-8.0.16+3\bin\win64\bin\mysqld.exe (mysqld 8.0.16) initializing of server in progress as process 3592\r\n2024-05-23T04:15:59.593768Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.\r\n2024-05-23T04:15:59.631033Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.\r\n2024-05-23T04:15:59.631113Z 0 [ERROR] [MY-013236] [Server] Newly created data directory %%userDataPath%%\run\sM2J_auAo\mysql\data\ is unusable. You can safely remove it.\r\n2024-05-23T04:15:59.631444Z 0 [ERROR] [MY-010119] [Server] Aborting\r\n2024-05-23T04:15:59.632463Z 0 [System] [MY-010910] [Server] %%userDataPath%%\lightning-services\mysql-8.0.16+3\bin\win64\bin\mysqld.exe: Shutdown complete (mysqld 8.0.16) MySQL Community Server - GPL.\r\n\n at ChildProcess.exithandler (node:child_process:422:12)\n at ChildProcess.emit (node:events:517:28)\n at ChildProcess.emit (node:domain:489:12)\n at maybeClose (node:internal/child_process:1098:16)\n at ChildProcess._handle.onexit (node:internal/child_process:303:5)”,“thread”:“main”,“timestamp”:“2024-05-23T04:15:59.696Z”}


Thanks for the help!

HI @Barrytron - Thank you for the update.

Is the issue still intermittent? Happens on certain sites but not all? Does it happen on a new blank site for example?

Could you share your full local log here for us? There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering.