Missing MariaDB

Bug Summary

Get warning that missing MariaDB v 10.4 and 10.6, start the effected servers and it tries to download the relevant version but get the following error

Steps to reproduce

Seemed to appear after installing MariaDB version 10.11.18, for a new server

Environment Info

  • Operating System: Windows 11
  • What versions of site software Apache various, PHP various, MariaDB v 10.4 and 10.6
  • Local Version 10.1.1+6939

Supporting info

Tried to export the servers and create a new instance for them on later version but export button wont click

Please provide your Local Log. See this Community Forum post for instructions on how to do so:

It looks like maybe Local is getting blocked. Have you checked over security/permissions? We have a Windows Troubleshooting guide below that goes over some common items worth checking. For example, ensure that Local is running as an administrator, that there are no security blockers, and that Local has access to update the Hosts file.

Hi Nick

None of the troubleshooting tips helped. Still get the same issue

I am still able to download different versions of PHP, so its not a permissions issue and i don’t use security blockers.

Thank you for the follow up @awr10e!

Could you share a full Local Log with us? If you click on the Question Mark on the left side of your Local app, then scroll down a little bit you’ll see a Download Local Log button. This collects multiple logs into a zip for us.

Hi Nick

I tried reinstalling but the same issue continued

here is the log

local-logs.zip (1.1 MB)

I got the exact same problem.

The problem might have begun when i first upgraded MariaDB on one site to newest version!?.

@awr10e and @jpegtobbe, thank you for your follow-up.

As a test, can you try exporting and reimporting your site? The export button won’t click when the site isn’t started, but you can manually locate your site files to save and bundle them for reimport. 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

Keep us posted if your site works again or if you have any issues.

Hi Nick

I zipped one server that had issues and imported it using the latest MariaDB 10.11.18 and the server is now working. 6c more to try :slight_smile:

Thanks

It works if i import a site-file and selects MariaDB 10.11.18 in the import (thats good, then we can manage to fix the problem at the moment).

If i select the version i was using before i will get the same failure.

Would you be able to send over a log as well @jpegtobbe? That way we can compare and see if anything stands out.

For now though I’m glad that reimporting is getting things working again!

How do i share the log securely with you?

Our Devs were able to look into this and discovered a bug @jpegtobbe. So we won’t require collecting a log from you. We’re going to push out a new Local release in the coming days that will include a fix for the MariaDB issue, but for now your best workaround will be the import flow as you’ve done already.

@awr10e FYI on this as well.

That sounds great! Thanks!

The issue appeared after activating 10.11

Here is a summary of the issue and how we resolved it.

Local’s add-on loader dedupes by name only:

isAddonLoaded(name, version) {
    const loadedAddon = this.loadedAddons.find((addon) => addon.name === name);
    if (!loadedAddon) return false;
    return compareVersionWithBuild(loadedAddon.version, version) >= 0;   // skip if loaded >= candidate
}

Every MariaDB package declares "name": "mariadb", so they all collide. Folders load alphabetically, and mariadb-10.11.18+0 sorts first (10.11 < 10.4 < 10.6 as strings) and is the highest version — so it loaded and shadowed all the others. Previously the first-enumerated was 10.4.10, the lowest, so every later version compared greater and loaded fine. Adding 10.11 inverted the whole thing.

Skipped services never enter _registeredServices → getSiteServiceByRole(site,'db') returns null → .preprovision() on null. The “Missing MariaDB v10.6” banner and the download loop were both downstream symptoms.

The fix

Renamed mariadb-10.11.18+0 → zz-mariadb-10.11.18+0 so it enumerates last. Service identity comes from package.json, not the folder name, so this is safe — and all four now load cleanly. No app patching, nothing that Local’s asar integrity check would reject.

isAddonLoaded(name, version) {
    const loadedAddon = this.loadedAddons.find(
        (addon) => addon.name === name && addon.version === version);
    return Boolean(loadedAddon);
}

Now that this is solved it will be great if you also package in a next release MariaDB 11.8 or 11.4 at a minimum for all of us who are working using embeddings and require this functionality.

Right now we are “forced” to bypass the WP Local’s db instance and connect with our own DBs.

It will also be great if we can at least have the option to connect to an external DB so that there will be no need for your VM to start a DB instance we do not use.