Unable to Start Site: "Oh-Uh! Unable to start site"

The logs show that MySQL is still unable to connect, but we’ve checked and re-checked most of the usual culprits here, and it still seems to be unable to connect on your device.

Are you still logged into your Guest account as well? What I mean is do you have Local running in both your Admin account and your Guest account that you were testing with?

A couple of other things to check here:

  • Does the device have enough disk space?

  • If you check your system settings is it utilizing a 32 bit or 64 bit connection?

i have uninstalled it from the guest. i now run it on the admin window. during installation i opted for only admin.

yes i have about 400GB free space. its 64 bit connection.

Sorry to hear you’re still seeing startup issues here, @czarpacciotti.

MySQL is taking a long time to start on your system. Local only waits ~25 seconds by default but MySQL takes well over a minute on your machine (it should start in about a second or two).

This could be a slow disk (e.g. slow HDD vs fast SSD) or Windows Defender.

If you think your disk is fine, you could temporarily disable Windows Defender’s real-time protection and try to start your site:

  1. Open Defender [or “Security”] → Virus & threat protection.
  2. Toggle Real-time protection to “Off”.
  3. Try to start the Local site again.

If site startup succeeds, Defender is the likely cause of the slow MySQL starts. You should enable real-time protection again and add exclusions to Defender for Local and MySQL if Local fails to start your sites again.

If this doesn’t help, we could try helping you extend Local’s MySQL timeouts if you’re comfortable backing up and editing JavaScript files.

1 Like

turning off the defender didnt work. so how do i select the local and mysql files to add for exclusion. selecting the file or folder is my worry.

i have not been able to add site to my localwp.

i agree my system is slow, it used to work before on my guest window.

Thanks for trying that, @czarpacciotti. If turning Defender off briefly did not work, excluding files in Defender probably won’t solve this. You should turn Defender back on if you have not already.

If you are comfortable navigating your filesystem and editing JavaScript files, you can try extending Local’s MySQL timeout as described below. If you are not comfortable trying this, an easier solution may be to try Local on another machine if you have access to one.

  1. Quit Local.

  2. Open Windows File Explorer.

  3. In File Explorer, choose ViewShow, and make sure Hidden items is checked.

  4. Browse to This PC → [your hard drive] → Users → [your username] → AppData → Roaming → Local → lightning-services → mysql-8.0.35+4 → lib

  5. Open the file named MysqlService.js in a text editor, such as VS Code.

  6. Scroll down to line 160 and change only this line of code:

    const maxTries = 5;
    

    To look like this instead:

    const maxTries = 50;
    
  7. Save the file and close your text editor.

  8. Start Local and try to start your site again.

Local should wait longer for your site to start, hopefully long enough that you no longer see ‘unable to start site’.

BOOM! It works bro, thanks so much. The problem is largely from my PC, i noticed that when i off the site, and tries to start it. it won’t start but when i restart my pc and opens the app, starts site, it works. Thanks a lot. But my challenge now is importing my sites.

i get this error message when i tried to import one of my sites, Screenshot by Lightshot , i have checked my folder and can see sql files there.

i also noticed that the app crashes after a while.

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