Cannot start nextcloud - nothing written to logfile

I managed to get NC reset such that when I go to the web page it’s in installation mode - SOLVED - How to reset / reinitialize nextcloud - NC-17. I tried many times to get it to use MariaDB and all I got was various different errors. So I decided to default to SQLite and created an admin user. I then tried to create my normal user (andrew) and it said there were already files for andrew. So I moved <nextcloud>/andrew aside and created the andrew user then put <nextcloud>/andrew back into place. Next, I ran an occ scan and it found all my old files. Great.

But I’d like to be using MariaDB instead of SQLite (though my usage is small). So I tried to convert the SQLite to MariaDB as described Converting database type — Nextcloud latest Administration Manual latest documentation. I’ve tried it with an empty database (create database nextcloud), with a nextcloud user 'create user nextcloud@localhost identified by '****' and grant all privileges on nextcloud.* to nextcloud@localhost identified by '****') as well as without the nextcloud database or nextcloud user.

With password protected by an envvar here’s what I get when I try it with an empty nextcloud database and a nextcould user:

Jupiter:docker exec -itu www-data nextcloud php occ db:convert-type --password $password -- mysql nextcloud 127.0.0.1 nextcloud
Creating schema in new database

In Connection.php line 140:
                                                                               
  Failed to connect to the database: An exception occurred in the driver: SQL  
  STATE[HY000] [2002] Connection refused                                       
                                                                               

db:convert-type [--port PORT] [--password PASSWORD] [--clear-schema] [--all-apps] [--chunk-size CHUNK-SIZE] [--] <type> <username> <hostname> <database>

Jupiter:

I don’t know why I’m getting connection refused. My MariaDB is running in it’s own container and I can verify that the nextcloud user with the $password can access the database. Using the same username password I can show databases:

Jupiter:docker exec -it mariadb mariadb -unextcloud -p$password -e "show databases"
+--------------------+
| Database           |
+--------------------+
| information_schema |
| nextcloud          |
+--------------------+
Jupiter: