Can not create admin user because of failing to connect to database

Installed nextcloud over a clean install of ubuntu server 22.04
This is a local server on my home network.
I setup php, apache, mariadb, etc as required
I type the internal IP of the server and get the webpage to create admin_user
When i put in the creditials and hit install I get error msg:
Error while trying to create admin user: Failed to connect to the database:
An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused

Looking into the various log files. The log file at /var/log/apache2/nextcloud.error.log
states that "client denied by server config: /var/www/nextcloud/data/htaccesstest.txt

That file does not exist in that directory but .htaccess does
Tried searching the web but could not come up with a fix for this but came up

Any help is appreciated.