in config/config.php
you can specify both dbhost
and dbport
.
Assume that your mysql/mariadb instance is listening on port 3307
, it would be natural (to me at least) declaring something like:
'dbhost' => '127.0.0.1',
'dbport' => '3307',
this leads to an internal server error (not logged anywhere).
I catched the error thoough ./occ
which stated:
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'localhost' (using password: YES) in /var/www/html/nextcloud/lib/private/DB/Connection.php:68
The correct configuration is:
'dbhost' => '127.0.0.1:3307',
'dbport' => '',
BTW:
-
dbport
is never used exceptlib/private/Setup/AbstractDatabase.php
-
dbport
is not present in config.sample.php -
dbport
is injected in config.php by setup process