SQLSTATE[HY000] [1045] Access denied for user 'oc_admin'@'172.18.0.1' (using password: YES)

Hello everybody. I know this post has been inactive for more than two years, but I’m still getting this error while trying to configure Nextcloud 18 on Ubuntu 20.04.

I took a look also at this discussion, but it hasn’t been of much help, unfortunately.

I Have the latest versions of MySQL, Apache and php.

I went through the steps @berniejo suggested, but nextcloud won’t allow me to use the same user I previously configured, it adds an index at the end to create a new user. In my case, if I tried another time, I’d get: 'oc_xplosionmind1'

Please help me, I’m getting crazy!

NOTE: not using Docker or Docker compose as @akrea

Here’s a screenshot: