I rewrote my automations / sensors so that they do not use time as a trigger or as a sensor update entity. This reduces the entries number is mysql database by 80%.
I also found entries in the database that seem to serve no purpose for the logbook or history and can be deleted. Although these entries are numerous, they don’t take a lot of room, but might slow searches.
Did you install MySQL and the requirements as laid out in the thread? Did you create the user, db, etc. as explained in the thread?
Or did you just change your configuration.yaml?
There’s prerequisites to moving from one DB platform to another, you can’t just change a line in the config. Inatalling MySQL and creating the user and blank db are a big part of this; you will need to read that thread.
And I would suggest reading some of my findings at the end before moving forward; there are some things that you will want to do in the initial setup that are a lot more difficult to do AFTER you install and move to MySQL that will make a big difference in performance and storage space.
Keep in mind that the dbuser name/password is the user you set up in MySQL, not the credentials in HA (assuming you didn’t use the same credentials in MySQL as you did in HA). hass is the name of my database, btw - note the pathing.
Also I would suggest reading this post before you go any further. As I said, this makes a big difference and is easier to do when you are initially setting up than afterwards.
I’m going to be in an out today, but I’ll try to check in to see how you are doing. But keep in mind there may be some lag time between responses. If anyone else can help out Claudio, I’d appreciate it.
When people create sensors they sometime have difficulty on how it updates. As a solution, they set this to time so it updates the sensor every second. This adds a lot to the database.
entity_id (Optional): Add a list of entity IDs so the sensor only reacts to state changes of these entities. This will reduce the number of times the sensor will try to update it’s state.
phpmyadmin is probably not for you if you just want to reduce your database. I thought it might be helpful to analyse the database entries to see which one is taking the most space. I would suggest you use the include option in the recorder and add only what you really want to log. (or track down which ones are causing the problem) You can then delete the database and recreate and see if the size builds as fast.
if you want phpmyadmin, put it in the www directory of HA or another webserver on your mysql machine.
I point to mine with this on builtin webserver on a mac.