I’m trying to get the db away from the SD card on the pi and using MariaDB on my Synology as described in a tutorial on this board, as I’m all thumbs concerning this stuff.
It’s not working, and I’m trying to troubleshoot. I can’t however find where the Synology stores the data on the NAS. I don’t see a subdirectory or file anywhere through regular means.
Where does the Synology put its mariaDB database ?
This might be more of a question for the Synology forum. And also why would you look at the files? Isn’t it easier to connect to the DB with a client and check the contents of the tables?
‘If your files are being stored in MariaDB that is running on the NAS rather than as separate files being referenced by another program, the way they are stored is actually a little different. MariaDB keeps its databases internal to itself and not on folders within volumes on the NAS’
Which is not very helpful.
I want to know whether it’s working. It is very difficult to troubleshoot a problem if you don’t know where the information is.
As for ‘connecting to the dB with a client’ : same answer.
What part is “not working”? Did you enter correct data in congiruration.yaml and restart HA?
You won’t be able to explore it like in a file explorer… it’s sql database, so sql program is needed. On synology install add-on “phpmyadmin” and you’ll be able to explore database. You’ll have to learn a bit of sql language, though.
I’m going round in circles here. I’m asking where the files are stored. If you don’t want to help, fine. But please don’t try to tell me ‘what I should be asking’. You are only complicating my problem.
@prontocek : that is indeed what I have done (only the user is not called ‘root’). I’m trying to determine if there is indeed a dB being built. The dB is made and exists according to myphp, but I can’t see if there is anything in it.
If you entered needed (and correct) data in configuration for new db location, then you look in HA’s history. If there’s data for the past there, then data is also inside new database. Or, as said: login into phpmyadmin, homeassistant and in sql tab enter:
select * from states where 1
and hit alt+enter; or, if you wanna search for particular entity:
select * from states where entity_id='sensor.id-of-your-sensor'
Don’t worry, you can’t break anything with commands, starting with “select”…
If you get results (entities) then it’s there. There’s no point in searching for “files”, since acutal files are not reachable to human user, only via admin console. In phpmyadmin you’ll also see database growing (size in kB/MB/GB) - just click on homeassistant on the left and in right window you’ll see tables and their sizes.
And, there’s no need for bad mood, bad attitude or anything similar. People are just trying to help. And your question was kinda “cloudy” - it’s not clear what you wanted to ask, since you said that “it doesn’t work”, but then again: “indeed dB is being bulit” (which means that it does work…).
I used mariadb for quite a while, too, back then it really was better regarding performance and reliability, but now it’s not anymore. A few months ago i changed back to built-in database and it turned out that it’s quicker than mariadb (history fills up faster), and so far it’s reliable, too. It was said that a lot was being made on improving sqlite in the past months, so it seems that it’s true.
If you have ssd you don’t have to worry about wear, that’s only in the case of using sd card.