How to convert Home Assistant database to MariaDB

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to our next video in this video we will go through the process needed to convert home assistant to use maria db instead of the default database mariadb is a relational database with an sql backend that is better suited for storing the data that home assistant generates it is quicker than the default sqlites database home assistant runs quicker as a result better performance is experienced with the larger data sets data can be queried using standard sql syntax if you're using an sd card for instance on a raspberry pi don't use maria db database rights will shorten the life of the sd card upgrade to an ssd or alternatively run home assistant as a virtual machine at the point of changing the database you will lose all previously recorded sensor data as with all home assistant tasks take a backup prior to making any changes [Music] first go to settings add-ons and click the add-on store button click on mariadb and click on install when it's installed enable the watchdog and then go to configuration [Music] replace null with a password go back to the info tab and click start click on the log and check if maria db has started to replace the home assistant database with mariadb you need to change something in the configuration.yaml file go to the documentation tab and scroll down until you get to the home assistant configuration section you'll see a couple of lines of code starting with recorder select this and copy click on file editor or your editor of choice open up configuration.yaml go to the bottom of the file and add the lines you just copied change the word password for the password you set in the mariadb config click the save icon we need to check our configuration and then restart to do this click on developer tools click the yaml tab at the top click on check configuration if it shows configuration valid you can then click restart if it failed you'll be guided to where the error is it's most likely to be a spelling or formatting error once home assistant has restarted click on the history tab if all went well you should ideally see only a few minutes of history if you click the refresh button this will gradually show more data if it's still showing the last 10 minutes of data chances are that you've missed a step possibly editing the configuration.yaml if all has worked well and you're now running on the new database you can safely remove the old database to do this go to file editor and click on the folder name [Music] find the home hyphen assistant underscore v2.db file click on the three dots and select delete select yes on the confirmation the migration to maria db is now complete you should see improved performance almost immediately thank you for watching if you like this video please click on the like button please also subscribe in order to see my other home assistant and smart home videos and if you have any comments or would like to see anything in particular please comment below
Info
Channel: Smart Home Addict
Views: 13,546
Rating: undefined out of 5
Keywords: home assistant, home assistant mariadb, home assistant database, home assistant recorder, home assistant sqlite, home assistant mariadb setup, home assistant mysql, home assistant mariadb vs sqlite, home assistant mariadb addon, home assistant database upgrade, home assistant mariadb location, home assistant database mariadb, home assistant setup 2022, home assistant setup raspberry pi, home assistant setup guide, home assistant sqlite vs mariadb, home assistant setup
Id: NgAs5CFLpks
Channel Id: undefined
Length: 6min 1sec (361 seconds)
Published: Sat Jun 04 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.