Mysql errors after updateing/migrating to 1.5 PI3 image(I figured it out)

I flashed an SD card with the new 1.5 image for PI3 the installed samba add-on, then dropped my system snapshot in the backup folder and restored the system configs.

However, after the restore (from a no error Hassio 1.3/Hass 0.73) the logs are filling up with mysql errors, (log snip below).

I checked my config files and they are the same as the working configs from the previous install. I when thru the wiki pages on configuring mariadb, in case I missed something new to configure, seems not.

In “confiurayion.yaml” I have:

recorder:
  db_url: mysql://hass:mypassword@core-mariadb/homeassistant
  purge_keep_days: 25
  exclude:
    entities:
      - sensor.date
      - sensor.time

And mariadb config:

{
  "databases": [
    "homeassistant"
  ],
  "logins": [
    {
      "username": "hass",
      "host": "%",
      "password": "mypassword"
    }
  ],
  "rights": [
    {
      "username": "hass",
      "host": "%",
      "database": "homeassistant",
      "grant": "ALL PRIVILEGES ON"
    }
  ]
}

Errors from log:

2018-07-12 19:34:01 ERROR (Recorder) [homeassistant.components.recorder] Error in database update. Could not save after 11 tries. Giving up
2018-07-12 19:34:01 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2003, 'Can\'t connect to MySQL server on \'core-mariadb\' (111 "Connection refused")') (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:01 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2003, 'Can\'t connect to MySQL server on \'core-mariadb\' (111 "Connection refused")') (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:05 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 4, 416218))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:05 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 4, 416218))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:09 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 8, 728844))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:09 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 8, 728844))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:14 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 12, 989077))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:14 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 12, 989077))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:18 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 17, 257096))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:18 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 17, 257096))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:22 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 21, 509604))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:22 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 21, 509604))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:27 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 25, 748872))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:27 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 25, 748872))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:31 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 30, 53153))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:31 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 30, 53153))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:35 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 34, 338450))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:35 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 34, 338450))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:39 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 38, 610302))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-12 19:34:39 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "hassio", "service": "host_reboot"}', 'LOCAL', datetime.datetime(2018, 7, 12, 22, 55, 33, 167490, tzinfo=<UTC>), datetime.datetime(2018, 7, 12, 23, 34, 38, 610302))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-12 19:34:39 ERROR (Recorder) [homeassistant.components.recorder] Error in database update. Could not save after 11 tries. Giving up

Did I run in to a bug or did I miss some necessary upgrade steps?

I had the same issue and had not logbook or history. I ended up deleting the Home-Assistant_V2.db file and rebooted. I lost all the history, but it’s working again.

Thanks. I gave deleting the .db a shot. However it seems new errors arose.
Log snip:

2018-07-13 17:49:41 ERROR (Recorder) [homeassistant.components.recorder] Error in database update. Could not save after 11 tries. Giving up
2018-07-13 17:49:41 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2003, 'Can\'t connect to MySQL server on \'core-mariadb\' (111 "Connection refused")') (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:49:41 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2003, 'Can\'t connect to MySQL server on \'core-mariadb\' (111 "Connection refused")') (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:49:45 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 44, 720399))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:49:45 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 44, 720399))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:49:50 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 48, 959214))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:49:50 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 48, 959214))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:49:54 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 53, 189975))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:49:54 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 53, 189975))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:49:58 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 57, 477394))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:49:58 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 49, 57, 477394))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:02 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 1, 738467))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:50:02 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 1, 738467))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:07 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 5, 997362))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:50:07 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 5, 997362))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:11 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 10, 239460))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:50:11 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 10, 239460))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:15 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 14, 519400))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:50:15 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 14, 519400))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:20 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 18, 812844))] (Background on this error at: http://sqlalche.me/e/e3q8)
2018-07-13 17:50:20 ERROR (Recorder) [homeassistant.components.recorder] Error in database connectivity: (_mysql_exceptions.OperationalError) (2013, 'Lost connection to MySQL server during query') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('service_registered', '{"domain": "frontend", "service": "set_theme"}', 'LOCAL', datetime.datetime(2018, 7, 13, 21, 41, 31, 442096, tzinfo=<UTC>), datetime.datetime(2018, 7, 13, 21, 50, 18, 812844))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
2018-07-13 17:50:20 ERROR (Recorder) [homeassistant.components.recorder] Error in database update. Could not save after 11 tries. Giving up 

Did you try to restart after you deleted?
My first try I just renamed the DB and got different errors. The 2nd time I copied the backup off, then deleted the old and new DB files and then restarted.
After the restart, I had history and logbook working again. Although there is no history yet in history.

What I did was stop Hass service, Then delete the .db, and reboot.

I let in run for 15 mins. Log was filling up with errors like the ones posted above.

Still having troubles.

One thing I noticed was after deleting ‘Home-Assistant_V2.db’ it not being recreated. even after several reboots.

My HassOS 1.5 log looks to be ok, no apparent errors:

18-07-15 21:17:15 INFO (MainThread) [__main__] Initialize Hassio setup
18-07-15 21:17:16 INFO (MainThread) [__main__] Setup HassIO
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.systemd1 on /org/freedesktop/systemd1
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.systemd1 - /org/freedesktop/systemd1
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Introspect org.freedesktop.hostname1 on /org/freedesktop/hostname1
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: org.freedesktop.hostname1 - /org/freedesktop/hostname1
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Introspect de.pengutronix.rauc on /
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Connect to dbus: de.pengutronix.rauc - /
18-07-15 21:17:16 INFO (MainThread) [hassio.host.info] Update local host information
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.DBus.Properties.GetAll on /org/freedesktop/hostname1
18-07-15 21:17:16 INFO (MainThread) [hassio.host.services] Update service information
18-07-15 21:17:16 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ListUnits on /org/freedesktop/systemd1
18-07-15 21:17:17 INFO (MainThread) [hassio.host.apparmor] Load AppArmor Profiles: {'hassio-supervisor'}
18-07-15 21:17:17 INFO (MainThread) [hassio.host.services] Reload local service hassos-apparmor.service
18-07-15 21:17:17 INFO (MainThread) [hassio.utils.gdbus] Call org.freedesktop.systemd1.Manager.ReloadOrRestartUnit on /org/freedesktop/systemd1
18-07-15 21:17:17 INFO (MainThread) [hassio.hassos] Detect HassOS 1.5 on host system
18-07-15 21:17:17 INFO (SyncWorker_0) [hassio.docker.supervisor] Attach to supervisor homeassistant/armhf-hassio-supervisor with version 115
18-07-15 21:17:17 INFO (SyncWorker_1) [hassio.docker.interface] Attach to image homeassistant/raspberrypi3-homeassistant with version 0.73.1
18-07-15 21:17:18 INFO (MainThread) [hassio.addons.git] Load addon /data/addons/git/a0d7b954 repository
18-07-15 21:17:18 INFO (MainThread) [hassio.addons.git] Load addon /data/addons/core repository
18-07-15 21:17:18 INFO (MainThread) [hassio.addons] Load addons: 41 all - 41 new - 0 remove
18-07-15 21:17:18 INFO (SyncWorker_3) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-mosquitto with version 2.0
18-07-15 21:17:18 INFO (SyncWorker_1) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-mariadb with version 0.2
18-07-15 21:17:18 INFO (SyncWorker_0) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-samba with version 4.1
18-07-15 21:17:18 INFO (SyncWorker_5) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-ssh with version 3.7
18-07-15 21:17:18 INFO (SyncWorker_4) [hassio.docker.interface] Attach to image hassioaddons/appdaemon3-armhf with version v1.2.0
18-07-15 21:17:18 INFO (SyncWorker_9) [hassio.docker.interface] Attach to image homeassistant/armhf-addon-configurator with version 0.4
18-07-15 21:17:18 INFO (MainThread) [hassio.updater] Fetch update data from https://s3.amazonaws.com/hassio-version/stable.json
18-07-15 21:17:46 INFO (MainThread) [hassio.snapshots] Found 1 snapshot files
18-07-15 21:17:46 INFO (MainThread) [__main__] Run HassIO
18-07-15 21:17:46 INFO (MainThread) [hassio.misc.dns] Start DNS port forwarding for host add-ons
18-07-15 21:17:46 INFO (MainThread) [hassio.core] Ignore Hass.io auto updates on dev channel
18-07-15 21:17:46 INFO (MainThread) [hassio.core] Start API on 172.30.32.2
18-07-15 21:17:46 INFO (MainThread) [hassio.addons] Startup initialize run 0 addons
18-07-15 21:17:46 INFO (MainThread) [hassio.addons] Startup system run 2 addons
18-07-15 21:17:51 INFO (SyncWorker_7) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-mariadb with version 0.2
18-07-15 21:17:51 INFO (SyncWorker_8) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-mosquitto with version 2.0
18-07-15 21:17:56 INFO (MainThread) [hassio.addons] Startup services run 2 addons
18-07-15 21:17:57 INFO (SyncWorker_15) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-samba with version 4.1
18-07-15 21:18:00 INFO (SyncWorker_2) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-ssh with version 3.7
18-07-15 21:18:06 INFO (SyncWorker_10) [hassio.docker.homeassistant] Start homeassistant homeassistant/raspberrypi3-homeassistant with version 0.73.1
18-07-15 21:20:08 INFO (MainThread) [hassio.homeassistant] Detect a running Home-Assistant instance
18-07-15 21:20:08 INFO (MainThread) [hassio.addons] Startup application run 2 addons
18-07-15 21:20:13 INFO (SyncWorker_15) [hassio.docker.addon] Start docker addon homeassistant/armhf-addon-configurator with version 0.4
18-07-15 21:20:14 INFO (SyncWorker_3) [hassio.docker.addon] Start docker addon hassioaddons/appdaemon3-armhf with version v1.2.0
18-07-15 21:20:16 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:16 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:16 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:17 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:17 INFO (MainThread) [hassio.api.security] /addons access from a0d7b954_appdaemon3
18-07-15 21:20:18 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:18 INFO (MainThread) [hassio.api.security] /addons access from a0d7b954_appdaemon3
18-07-15 21:20:19 INFO (MainThread) [hassio.tasks] All core tasks are scheduled
18-07-15 21:20:19 INFO (MainThread) [hassio.core] Hass.io is up and running
18-07-15 21:20:19 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:20 INFO (MainThread) [hassio.api.security] /addons/a0d7b954_appdaemon3/info access from a0d7b954_appdaemon3
18-07-15 21:20:36 INFO (MainThread) [hassio.api.proxy] Home-Assistant Websocket API request initialze
18-07-15 21:20:36 INFO (MainThread) [hassio.api.proxy] Websocket access from a0d7b954_appdaemon3
18-07-15 21:20:36 INFO (MainThread) [hassio.api.proxy] Home-Assistant Websocket API request running
18-07-15 21:20:36 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/config access from a0d7b954_appdaemon3
18-07-15 21:20:36 INFO (MainThread) [hassio.api.proxy] /homeassistant/api/states access from a0d7b954_appdaemon3

However the first error still persists. I’m going to let it run over night. In thinking that perhaps some maintenance task need to run and maybe clear it up.

still seeking a remedy.

I’m not sure I’m going to be much more help.
Mine was recreated within a minute or two. I think I flipped a switch a couple of times to make some “history” to check that it was working.
For example, click on a senor, switch, light, etc… look at the history bar at the top. If it shows the current state for the past 12hrs then it’s not recording history.
Possibly something with looking at the history will create it if it doesn’t exist.

I’ve given up. Went back to the previous version. The hass log was growing to fast with errors.

Ok I think the snapshot restore process failed somehow. I had tried 4 sd cards with 32/64 bit images all had the errors after restoring the snapshot.

I removed and reinstalled MariaDB and things started working.

/Sigh

By “remove”, do you mean that you uninstalled it via the Hassio panel?

I’m running into the same error after restoring my snapshot to the new HassOS image.

I’ve tried deleting the db file and uninstalling/reinstalling the MariaDB addon. Confirmed that my user/password were correct. No luck.

I’m also noticing that MariaDB doesn’t start on reboot despite having that setting enabled.

Yes, via the Hassio panel.

I’m not sure what Home-Assistant_V2.db is for, I think it’s a left over from a earlier version, it never recreates on my system.