Looks like you didn’t change the default sqlite to mysql.
I think you can do your setup again by removing your config.php (or change it’s name so you have a backup) and add a file named CAN_INSTALL in the same directory. Then browse to yourncdomain.com and do the setup again. Remember to change to the mysql this time.
https://docs.nextcloud.com/server/18/admin_manual/installation/installation_wizard.html#data-directory-location-label
The port is the port your mysql uses… Look it’s configs too.