How to uninstall MariaDB

Hello i want to remove MariaDB to test the new database

I’ve disabled the extension, removed the configuration from the config, is there any file i should remove?

That’s an odd statement. MariaDB is updated to the new schema as well.

Oh, so MariaDB is still better than the default database?

EDIT: i can confirm HA is faster without MariaDB

In the 2023.4 Release Party it is my understanding that they advocated for removing MariaDB as the default database is now just as good and having MariaDB just puts more responsibility on the user to ensure things don’t break. If my understanding is correct, I would like to revert to the default DB as I migrated to MariaDB for performance and reliability… if the advantage is gone, then my reason to use it has gone too. Can anyone confirm? Maybe with more than anecdotal information?

Also, I am using influxDB for Grafana… I’d like to confirm that removing MariaDB will not impact influxDB and Grafana functionality. I would not think so, but I am unsure.

Hope somebody can give more info, but i can confirm it is way faster now after removing MariaDB, we just have to see if it’s going to be the same a week from now

@Razer - what is your hardware setup? In my case HA is running in a VM on an i7 with 12 cores dedicated to HA (I know overkill…) and everything is running off of an M2 NVME SSD. I am just wondering whether the improvement is as visible on a robust hardware platform Vs for example an RPI. Also, where do you see speed improvements? I’d like to check performance on my system the same way.

Did you just disable the addon and remove it? How is the data moved back from MariaDB to the default?

I have a RPI 3B+

Disabled the addon, removed the config line from configuration file then rebooted, data are not moved back, a new database is generated

2 Likes

The performance improvement you are seeing is very likely because you deleted all the data. An empty database is going to be faster to search than one with 10 days of data.

One advantage of using the MariaDB addon is that it keeps running in its own container when you restart home assistant. So HA does not have to wait for it to initialise during start up.

If you don’t have a lot of yaml integrations that require restarts for config changes to take effect then this is less of an issue.

3 Likes

Am I right to assume the data cannot be migrated back to the native sqlite db?

That is … to migrate from mysql to sqlite I must delete the mariadb addon, remove the entry below from configuration.yaml, reboot and start from again scratch?

recorder:
  db_url: mysql://homeassistant:gear1nif_eec!stof@core-mariadb/homeassistant?charset=utf8mb4

Is there a way to migrate the data across?

AFAIK it’s not possible

OK, thanks.

@currest2620 Hmmmm, not sure it is a good IT policy to share your database credentials… :wink:

1 Like

A bit late to the party, but it is possible.
Here is a video that explains it (Its in German, so you might want to enable sub titles)

Works quite well

1 Like