yes, just one to check
You need to enable remote access for this user. Per default you can only connect from localhost (same host where mariadb is running)
You need to check in phpMyAdmin that the privileges for the user allows access to the database externally. By default only users on LOCALHOST can login to the database, unless you remembered to change it when you created the user.
OK, but have you then allowed that user to have access to the database? And having done all that have you then flushed privileges to apply the new settings?
This would have been MUCH easier - if you had done it using the mysql command directly on the server, typing a few commands, and it would be done and ready.
A new user doesn’t automatically have access to any databases, you need to go to the privileges tab, edit the user, scroll down to “database specific privileges” and if the database is already listed under privileges for the user, then click the edit button and ensure that ALL possible privileges have been granted to that user. It needs access to all the privileges under data and structure. Or it can’t create the tables it needs to operate.
You could also add:
logger:
logs:
homeassistant.components.recorder: info
to your configuration.yaml so we can get more information about why specifically it is failing to connect. (and info level doesn’t provide enough information, try debug)
Setup failed for recorder: Integration failed to initialize.
21:42:28 – (FEHLER) setup.py - Die Nachricht ist zum ersten Mal um 21:42:01 aufgetreten und erscheint 5 mal
Unable to set up dependencies of history. Setup failed for dependencies: recorder
21:42:28 – (FEHLER) setup.py
Setup of recorder is taking over 10 seconds.
21:42:17 – (WARNUNG) /usr/local/lib/python3.9/asyncio/events.py
Error during connection setup to mysql://user:mypassword@ip-adress/homeassistant?charset=utf8mb4: (MySQLdb._exceptions.OperationalError) (2002, “Can’t connect to MySQL server on ‘ip-adress’ (115)”) (Background on this error at: Error Messages — SQLAlchemy 1.4 Documentation) (retrying in 3 seconds)
21:41:58 – (FEHLER) Recorder
Ok the last error say, that homeassistant cant connrect to the database. but what must I change now?
OK what is the full URL you are using to connect the recorder to the database? If the IP address is an internal one - you are not putting yourself at risk by posting it here, it’s ONLY external IP addresses that are risky.
OK the next thing to ask is what computer is the mysql / mariadb server running on? ie what operating system is it running? It’s possible that port 3306 isn’t open to incoming connections from other machines on the network.