I’m having issues trying to connect to my database (mariadb). As you can see in the error below Nextcloud tries to connect with the user ‘admin.berkelland’@‘nextcloud.backend’. This suffix is incorrect and should be ‘admin.berkelland’@‘mysql’.
I’m using version 18.0.10.2.
{
“reqId”: “5VCRVyOFCbC8VbztbU5i”,
“level”: 3,
“time”: “2020-12-24T20:41:29+00:00”,
“remoteAddr”: “REMOVED”,
“user”: “–”,
“app”: “core”,
“method”: “GET”,
“url”: “/”,
“message”: {
“Exception”: “Doctrine\DBAL\DBALException”,
“Message”: “Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user ‘admin.berkelland’@‘nextcloud.backend’ (using password: YES)”,
“Code”: 0,
“Trace”: [
{
“file”: “/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php”,
“line”: 1449,
“function”: “connect”,
“class”: “OC\DB\Connection”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php”,
“line”: 892,
“function”: “getWrappedConnection”,
“class”: “Doctrine\DBAL\Connection”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/DB/Connection.php”,
“line”: 202,
“function”: “executeQuery”,
“class”: “Doctrine\DBAL\Connection”,
“type”: “->”,
“args”: [
“SELECT * FROMoc_appconfig
”,
,
,
null
]
},
{
“file”: “/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php”,
“line”: 206,
“function”: “executeQuery”,
“class”: “OC\DB\Connection”,
“type”: “->”,
“args”: [
“SELECT * FROMoc_appconfig
”,
,
]
},
{
“file”: “/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php”,
“line”: 217,
“function”: “execute”,
“class”: “Doctrine\DBAL\Query\QueryBuilder”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/AppConfig.php”,
“line”: 345,
“function”: “execute”,
“class”: “OC\DB\QueryBuilder\QueryBuilder”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/AppConfig.php”,
“line”: 110,
“function”: “loadConfigValues”,
“class”: “OC\AppConfig”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/AppConfig.php”,
“line”: 301,
“function”: “getApps”,
“class”: “OC\AppConfig”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/legacy/OC_App.php”,
“line”: 949,
“function”: “getValues”,
“class”: “OC\AppConfig”,
“type”: “->”,
“args”: [
false,
“installed_version”
]
},
{
“file”: “/var/www/html/lib/private/TemplateLayout.php”,
“line”: 185,
“function”: “getAppVersions”,
“class”: “OC_App”,
“type”: “::”,
“args”:
},
{
“file”: “/var/www/html/lib/private/legacy/OC_Template.php”,
“line”: 183,
“function”: “__construct”,
“class”: “OC\TemplateLayout”,
“type”: “->”,
“args”: [
“error”,
“”
]
},
{
“file”: “/var/www/html/lib/private/Template/Base.php”,
“line”: 132,
“function”: “fetchPage”,
“class”: “OC_Template”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/lib/private/legacy/OC_Template.php”,
“line”: 332,
“function”: “printPage”,
“class”: “OC\Template\Base”,
“type”: “->”,
“args”:
},
{
“file”: “/var/www/html/index.php”,
“line”: 63,
“function”: “printExceptionErrorPage”,
“class”: “OC_Template”,
“type”: “::”,
“args”: [
{
“class”: “Doctrine\DBAL\DBALException”
},
500
]
}
],
“File”: “/var/www/html/lib/private/DB/Connection.php”,
“Line”: 72,
“CustomMessage”: “–”
},
“userAgent”: “Mozilla/5.0 (compatible; PRTG Network Monitor (www.paessler.com); Windows)”,
“version”: “18.0.10.2”
}
Part of config.php that contains mysql connection information:
‘dbname’ => ‘nextcloud_db’,
‘dbhost’ => ‘mysql’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘admin.berkelland’,
‘dbpassword’ => ‘’,
How can I get the username right?