Adding mysql client fails

I have a good running installation of hass on DEBIAN 10 following the tutorial. It is a docker system as I found out.
Now I like to store values from sensors to a mariadb database for long term statistics. So I followed Recorder - Home Assistant. I did this as root. I have python 3 and pip3 running but finaly “pip3 install mysqlclient” fails. I assume I have to this within Docker.
need help
and has someone a sample for setting up the database. Not the basics, but where in hass do I determ what to export and what is the data format
Thank you

Rainer

Found a video Make Home Assistant log its datapoints to MySQL! - YouTube that explaind most.
lokked at Recorder - Home Assistant and im configuration.yam I now have a section looking like this.

recorder:
db_url: mysql://homeassistant:[email protected]/hass?charset=utf8
purge_keep_days: 730
include:
entity_globs:
- sensor.

But now I have sensor I do not want to record like

sensor:

  • platform: mqtt
    state_topic: state/Wohnung/Gaerk/ist_temp
    name: “Gärschrank ist Temperatur”
    unit_of_measurement: “°C”

  • platform: mqtt
    state_topic: state/Wohnung/Gaerk/ist_time
    name: “Gärschrank ON Zeit”

    and I would record looking like this

  • platform: mqtt
    state_topic: Wohnung/Balkon/get/temperature
    name: “Balkon Temperatur”
    unit_of_measurement: “°C”

  • platform: mqtt
    state_topic: Wohnung/Balkon/get/dewpoint
    name: “Balkon Taupunkt”
    unit_of_measurement: “°C”

    both under sensor:
    what should I write behind sensor in the recorder section

Thanks for help
Rainer