Installer keeps redirecting to sqlite

While trying to configure nextCloud (to replace my ownCloud instance as php 7.4 will soon be removed from FreeBSD 13.1), I’ve run into an issue:

I enter all the information for the the mysql (5.7.40) database I have configured into nextcloud/index.php. I’ve specified the db host localhost:3306.

When I click on the Install button, I get back the same form, again defaulting to sqlite.

I have manually succeeded in logging in to the db via the command line, i.e. using
mysql -unextcloud_user -p -h127.0.0.1.

What am I missing?

Well one step forward! I missed that there was another permissions issue with nextcloud/data.

After fixing that I now get a redirect to

Needless to say, that tried opening the file on my Mac workstation, and nginx gave me a 404!

Manually changing the URL to the server IP fixed this.