DB Access Denied Error During Install

You need to enable the database permission on other users

I have the same problem again. I am running Matomo on AWS with some docker container on ECS and the DB on RDS. The working version for the docker image is matomo:4.6.2-apache

Now, when trying to upgrade, I can do what I want but I always come to the DB setup page, enter my details and then see some error page next Could not connect to the database: Database access denied

When I restart the container, I come back to the installation page. When I downgrade to image matomo:4.6.2-apache again, it all works fine.

I checked privileges of the admin user I am using and it looks ok. The host for this user in the Matomo DB is ‘%’.
Can somebody please advise what to look for?
Since it is a fresh setup, there is no config.ini as mentioned previously.