Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 20.0.11): 20.0.11
Operating system and version (eg, Solaris 11.4): Solaris 11.4
Apache or nginx version (eg, Apache 2.4.25): 2.4.48
PHP version (eg, 7.4): 7.3
The issue you are facing:
Nextcloud fails to run unless I run mysql with skip-grant-tables
Is this the first time you’ve seen this error? (Y/N):N
1st happened earlier this year, I tweaked the my.cnf and forgot about it
Steps to replicate it:
- Run/restart mysql without skip-grant-tables in my.cnf
The output of your Nextcloud log in Admin > Logging:
{"reqId":"zjMD3ipUOUEVAarnZSk9","level":3,"time":"2021-11-11T12:17:12+00:00","remoteAddr":"82.47.37.5","user":"--","app":"index","method":"GET","url":"/nextcloud/index.php/apps/files/?dir=/Pictures&fileid=15243","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_admin'@'localhost' (using password: YES)","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php"
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'passwordsalt' => 'fZnHTc2koNT5ARED0wfZo6dxvrtaIO',
'secret' => 'rd8jImrCfEVM7frCcIJPafTgzETMAW4p7BtonY9WEKqoapBB',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.0.66',
2 => '192.168.0.66:643',
3 => 'ytc-cloud:643',
4 => 'ytc1-cloud.dyndns.org:643',
5 => 'ytc1.dyndns.org:643',
6 => 'ytc-cloud:80',
),
'datadirectory' => '/nextcloud/server/nextcloud/data',
'overwrite.cli.url' => 'http://localhost',
'dbtype' => 'mysql',
'version' => '20.0.11.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => '*****removed******',
'logtimezone' => 'UTC',
'installed' => true,
'instanceid' => 'oc798ms43svp',
'loglevel' => 0,
'mail_from_address' => '*******',
'mail_smtpmode' => 'smtp',
'mail_domain' => '*********',
'auth.bruteforce.protection.enabled' => false,
'theme' => '',
'mail_sendmailmode' => 'smtp',
'maintenance' => false,
'mysql.utf8mb4' => false,
'mail_smtpsecure' => 'tls',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtphost' => 'mail.maui.co.uk',
'mail_smtpport' => '587',
'mail_smtpname' => '*******',
'mail_smtppassword' => '********',
);
The output of your Apache/nginx/system log in /var/log/____
:
[Thu Nov 11 12:44:18.868722 2021] [php7:error] [pid 11724] [client 192.168.0.4:53866] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_admin'@'localhost' (using password: YES) in /var/www/nextcloud/lib/private/DB/Connection.php:72\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(892): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(202): Doctrine\\DBAL\\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\\DB\\Connection->executeQuery('SELECT * FROM `...', Array, Array)\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(248): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n# in /var/www/nextcloud/lib/private/DB/Connection.php on line 72
[Thu Nov 11 12:44:18.880934 2021] [php7:error] [pid 23625] [client 192.168.0.4:53868] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_admin'@'localhost' (using password: YES) in /var/www/nextcloud/lib/private/DB/Connection.php:72\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1449): OC\\DB\\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(892): Doctrine\\DBAL\\Connection->getWrappedConnection()\n#2 /var/www/nextcloud/lib/private/DB/Connection.php(202): Doctrine\\DBAL\\Connection->executeQuery('SELECT * FROM `...', Array, Array, NULL)\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(206): OC\\DB\\Connection->executeQuery('SELECT * FROM `...', Array, Array)\n#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(248): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 /var/www/nextcloud/lib/private/AppConfig.php(345): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n# in /var/www/nextcloud/lib/private/DB/Connection.php on line 72
[Thu Nov 11 12:44:18.900479 2021] [php7:error] [pid 23998] [client 192.168.0.4:53870] PHP Fatal error: Uncaught Error: Class 'OCA\\DAV\\Connector\\Sabre\\ExceptionLoggerPlugin' not found in /var/www/nextcloud/remote.php:61\nStack trace:\n#0 /var/www/nextcloud/remote.php(169): handleException(Object(Doctrine\\DBAL\\DBALException))\n#1 {main}\n thrown in /var/www/nextcloud/remote.php on line 61