Recorder issues after upgrade from 45.1 to 46

After upgrading from 45.1 I git a recorder/logbook/history warning in my UI. Error below.

So digging deeper it seemed an error with MySql. (see putty error).

Googled on this and tried suggested solutions but still not working again.

In then end fully uninstalled MySQL and went back default SQL lite database; at least that was the plan. Still get below errors in the logs (What I tried: removing the reference to MySQL in the configuration YAML, sudo reboot, did another upgrade to make sure there where no dependencies not installed).

So 2 Q’s:
a) Anybody also having issues with HASS 46.0 and MySQL?
b) How can I revert back to default SQLlite?

Hass log
2017-06-05 13:10:27 ERROR (Recorder) [homeassistant.components.recorder] Error during connection setup: libmysqlclient.so.18: cannot open shared object file: No such file or directory (retrying in 3 seconds)

Via putty:
error: 'Can't connect to local MySQL server through socket '

No, running fine here on 46.0

I think all you need to do is comment out the db_url:, no? As SQLite is the default, it should create it on startup if you’re using recorder options without a db explicitly configured.

@rpitera At least I have SQLlite back. Commenting out was not enough, I had to specifically add the SQLite URL.

Still trying to figure out why mySQL broke…

Really? It’s not mentioned at all in the docs.

Could you provide an example here so that it’s part of the knowledge base? Thanks.

(Glad you got this sorted out. Maybe you could run a consistency check on your MySQL db and see if it yileds any answers? https://dev.mysql.com/doc/refman/5.7/en/mysqlcheck.html)

It might because it was previously using MySQL I had to explicitly state it had to use SQLite? The errors would continue in the log until I added the SQLite reference.

What did NOT work:

recorder:
  purge_days: 21
  exclude:
    entities:
      - sun.sun
      - media_player.gitte
      - media_player.keuken
      - media_player.studeerkamer
      - media_player.tvkamer
      - media_player.eetkamer

What worked:

recorder:
  db_url: sqlite:///home/hass/.homeassistant/test
  purge_days: 21
  exclude:
    entities:
      - sun.sun
      - media_player.gitte
      - media_player.keuken
      - media_player.studeerkamer
      - media_player.tvkamer
      - media_player.eetkamer
1 Like

Thanks; I wanted to know this in case someone else runs into it and I’m sure this will help someone in the future.

Good to know.

Finally fixed this:

1 Like