Getting error when connecting to database

Hello,

Support intro

{“reqId”:“7J5PDeHfFP0QU54FdGyu”,“level”:3,“time”:“2020-11-29T13:05:01+00:00”,“remoteAddr”:“192.168.5.218”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/nextcloud/",“message”:{“Exception”:“Doctrine\DBAL\Exception\DriverException”,“Message”:“An exception occurred while executing ‘SELECT * FROM oc_authtoken WHERE (token = ?) AND (version = ?)’ with params [“d5b7aa8ab5696840a78ab483c34053d08dc4a780776d3bc01badbcd712da89fc2f95104a25631ff8f8ec1c011fa5f8949b4304d1dfd26736217bce937e439acd”, 2]:\n\nSQLSTATE[HY000]: General error: 2013 Lost connection to MySQL server during query”,“Code”:0,“Trace”:[{“file”:"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",“line”:169,“function”:“convertException”,“class”:“Doctrine\DBAL\Driver\AbstractMySQLDriver”,“type”:"->"},{“file”:"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",“line”:149,“function”:“wrapException”,“class”:“Doctrine\DBAL\DBALException”,“type”:"::"},{“file”:"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",“line”:914,“function”:“driverExceptionDuringQuery”,“class”:“Doctrine\DBAL\DBALException”,“type”:"::"},{“file”:"/var/www/html/nextcloud/lib/private/DB/Connection.php",“line”:194,“function”:“executeQuery”,“class”:“Doctrine\DBAL\Connection”,“type”:"->"},{“file”:"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",“line”:206,“function”:“executeQuery”,“class”:“OC\DB\Connection”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",“line”:217,“function”:“execute”,“class”:“Doctrine\DBAL\Query\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenMapper.php",“line”:81,“function”:“execute”,“class”:“OC\DB\QueryBuilder\QueryBuilder”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php",“line”:104,“function”:“getToken”,“class”:“OC\Authentication\Token\PublicKeyTokenMapper”,“type”:"->",“args”:["*** sensitive parameters replaced "]},{“file”:"/var/www/html/nextcloud/lib/private/Authentication/Token/Manager.php",“line”:137,“function”:“getToken”,“class”:“OC\Authentication\Token\PublicKeyTokenProvider”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/html/nextcloud/lib/private/User/Session.php",“line”:636,“function”:“getToken”,“class”:“OC\Authentication\Token\Manager”,“type”:"->",“args”:[" sensitive parameters replaced "]},{“file”:"/var/www/html/nextcloud/lib/private/User/Session.php",“line”:828,“function”:“loginWithToken”,“class”:“OC\User\Session”,“type”:"->",“args”:[" sensitive parameters replaced ***"]},{“file”:"/var/www/html/nextcloud/lib/base.php",“line”:1053,“function”:“tryTokenLogin”,“class”:“OC\User\Session”,“type”:"->"},{“file”:"/var/www/html/nextcloud/lib/base.php",“line”:998,“function”:“handleLogin”,“class”:“OC”,“type”:"::"},{“file”:"/var/www/html/nextcloud/index.php",“line”:37,“function”:“handleRequest”,“class”:“OC”,“type”:"::"}],“File”:"/var/www/html/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",“Line”:106,“Previous”:{“Exception”:“Doctrine\DBAL\Driver\PDOException”,“Message”:"SQLSTATE[HY000]: General error: 2013 Lost connection

Nextcloud version (eg, 18.0.2): 20.1.1
Operating system and version (eg, Ubuntu 20.04): 18.04
Apache or nginx version (eg, Apache 2.4.25): 2.9
PHP version (eg, 7.1): 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):
N

I am using proxysql to connect to db, but direct connection also gives the same error

What should your posting tell us, except that you get an error message displayed if you try to access a database? Due to the fact that you get the same error using proxysql, I would classify the problem as a normal OS related problem first and not a Nextcloud one.

Additionally your report doesn’t contain any valuable information which should allow someone to fully understand or analyze your problem.

Please provide DETAILED information about your environment, your network, your database setup, any error messages being displayed and also provide a step-by-step description what you’ve tested in which order with which result. Please be AS PRECISE as possible!

thank you for getting back , I discovered later the media wasnt preesnt that moment I tried to rename from nextcloud.

1 Like