Error connecting to external DB after reboot

I have set up my HA to connect to an external sql db hosted online by my hosting plan.

recorder:
  db_url: mysql://UN:PW@DBaddress:DBport/DBname?charset=utf8
  purge_interval: 0
  include:
    domains:
     - input_number
     - binary_sensor
    entities:
     - sensor.water_meter_liters
     - sensor.water_meter_2_liters
     - automation.motion_any
     - switch.saloni_4_auto_enabler
  exclude:
    entities:
     - input_number.radiator_timer_upstairs

On initial set up, it connected great and created the tables required.

Unfortunately after some time, I think after my daily scheduled reboot i get this error:

Error in database connectivity: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('state_changed', '{"entity_id": "binary_sensor.pir_living_room", "old_state": {"entity_id": "binary_sensor.pir_living_room", "state": "off", "attributes": {"friendly_n ... (509 characters truncated) ... \u03a3\\u03b1\\u03bb\\u03cc\\u03bd\\u03b9"}, "last_changed": "2018-07-20T09:31:49.184710+00:00", "last_updated": "2018-07-20T09:31:49.184710+00:00"}}', 'LOCAL', datetime.datetime(2018, 7, 20, 9, 31, 49, 184940, tzinfo=<UTC>), datetime.datetime(2018, 7, 20, 9, 31, 49, 207965))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)
12:31 PM components/recorder/__init__.py (ERROR)

And further details when i click it (probably similar):

Log Details (ERROR)
Fri Jul 20 2018 12:31:49 GMT+0300 (Eastern European Summer Time)

Error in database connectivity: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: 'INSERT INTO events (event_type, event_data, origin, time_fired, created) VALUES (%s, %s, %s, %s, %s)'] [parameters: ('state_changed', '{"entity_id": "binary_sensor.pir_living_room", "old_state": {"entity_id": "binary_sensor.pir_living_room", "state": "off", "attributes": {"friendly_n ... (509 characters truncated) ... \u03a3\\u03b1\\u03bb\\u03cc\\u03bd\\u03b9"}, "last_changed": "2018-07-20T09:31:49.184710+00:00", "last_updated": "2018-07-20T09:31:49.184710+00:00"}}', 'LOCAL', datetime.datetime(2018, 7, 20, 9, 31, 49, 184940, tzinfo=<UTC>), datetime.datetime(2018, 7, 20, 9, 31, 49, 207965))] (Background on this error at: http://sqlalche.me/e/e3q8). (retrying in 3 seconds)

Edit: new error came up, 2013

T+0300 (Eastern European Summer Time)

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: ('state_changed', '{"entity_id": "sensor.water_meter_liters", "old_state": {"entity_id": "sensor.water_meter_liters", "state": "24920.48", "attributes": {"unit_of_measu ... (268 characters truncated) ... ": "lt", "friendly_name": "Paleo WM in Lt"}, "last_changed": "2018-07-22T11:35:01.511397+00:00", "last_updated": "2018-07-22T11:35:01.511397+00:00"}}', 'LOCAL', datetime.datetime(2018, 7, 22, 11, 35, 1, 511561, tzinfo=<UTC>), datetime.datetime(2018, 7, 22, 11, 35, 1, 552402))] (Background on this error at: http://sqlalche.me/e/e3q8)

I can only fix it by logging in to the database and dropping the tables (clearing the whole db) and then it works fine again for some time.

Any ideas or any mistakes i have made?
Regards,
K.