-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Owncloud in Ubuntu 16.04 - Failed to connect to the database: Access denied for user ‘root’@’localhost’ #26110
Comments
Thank you to all. Here´s the solution:
mysql -u root -p CREATE DATABASE owncloud;
Thank you! Tony |
Good Day to you all I have this error below when I try to install owncloud server on my mac os sierra: Exception occurred while logging exception: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user ''@'localhost' to database 'veritascloud' |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
please excuse my bad english - but I am not a native speaker.
My Problem: After the Dist-Upgrade from Ubuntu 14.04 to 16.04 I get only a white site on the Browser (https://myserver/owncloud/index.php).
Steps to reproduce
Expected behaviour
owncloud should connect to mysql
Actual behaviour
Failed to connect to the database: Access denied for user ‘root’@’localhost’
Server configuration
Before the upgrade I run owncloud 9,1,0,15 (owncloud/version.php) + php5 + mysql-server-5.5 (Ubuntu 14.04 LTS). After the dist-upgrade I see owncloud 9.1.0-1.1 (in deselect) + php 7 + mysql-server-5.7-15
Web server: apache2
sudo -u www-data php occ app:list
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' in /var/www/owncloud-org/lib/private/DB/Connection.php:58
Stack trace:
#0 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/owncloud-org/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/owncloud-org/lib/private/DB/ConnectionFactory.php(120): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/owncloud-org/lib/private/Server.php(410): OC\DB\ConnectionFactory->getConnection('mysql', Array)
#8 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#9 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('DatabaseConnect...')
#10 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
#11 /var/www/owncloud-org/lib/private/Server.php(969): OC\ServerContainer->query('DatabaseConnect...')
#12 /var/www/owncloud-org/lib/private/Server.php(215): OC\Server->getDatabaseConnection()
#13 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#14 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...')
#15 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...')
#16 /var/www/owncloud-org/lib/private/Server.php(219): OC\ServerContainer->query('OC\Authenticati...')
#17 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#18 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...')
#19 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...')
#20 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(150): OC\ServerContainer->query('OC\Authenticati...')
#21 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#22 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...')
#23 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...')
#24 /var/www/owncloud-org/lib/private/Server.php(234): OC\ServerContainer->query('OC\Authenticati...')
#25 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#26 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('UserSession')
#27 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserSession')
#28 /var/www/owncloud-org/lib/private/Server.php(846): OC\ServerContainer->query('UserSession')
#29 /var/www/owncloud-org/lib/private/Server.php(454): OC\Server->getUserSession()
#30 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#31 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('AppManager')
#32 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
#33 /var/www/owncloud-org/lib/private/Server.php(1146): OC\ServerContainer->query('AppManager')
#34 /var/www/owncloud-org/lib/private/legacy/app.php(284): OC\Server->getAppManager()
#35 /var/www/owncloud-org/lib/private/legacy/app.php(105): OC_App::getEnabledApps()
#36 /var/www/owncloud-org/lib/base.php(573): OC_App::loadApps(Array)
#37 /var/www/owncloud-org/lib/base.php(967): OC::init()
#38 /var/www/owncloud-org/console.php(50): require_once('/var/www/ownclo...')
#39 /var/www/owncloud-org/occ(11): require_once('/var/www/ownclo...')
The content of config/config.php:
'50f2b69bdd312', 'passwordsalt' => 'XXX', 'datadirectory' => '/var/www/owncloud/data', 'dbtype' => 'mysql', 'version' => '9.1.0.15', 'installed' => true, 'maintenance' => false, 'theme' => '', 'trusted_domains' => array ( 0 => 'gustav.duck', ), 'loglevel' => 0, 'mail_from_address' => 'administrator', 'mail_smtpmode' => 'smtp', 'mail_domain' => 'gustav.duck', 'mail_smtphost' => 'gustav.duck', 'mail_smtpport' => '25', 'secret' => 'XXX', 'dbname' => 'owncloud', 'dbhost' => '127.0.0.1', 'dbuser' => 'root', 'dbpassword' => '', 'updatechecker' => false, 'overwrite.cli.url' => 'http:/gutstav.duck/owncloud', 'memcache.local' => '\OC\Memcache\APCu', sudo -u www-data php occ config:list system An unhandled exception has been thrown: Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' in /var/www/owncloud-org/lib/private/DB/Connection.php:58 Stack trace: #0 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect() #1 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #2 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform() #3 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform() #4 /var/www/owncloud-org/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2) #5 /var/www/owncloud-org/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager)) #6 /var/www/owncloud-org/lib/private/DB/ConnectionFactory.php(120): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager)) #7 /var/www/owncloud-org/lib/private/Server.php(410): OC\DB\ConnectionFactory->getConnection('mysql', Array) #8 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server)) #9 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('DatabaseConnect...') #10 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...') #11 /var/www/owncloud-org/lib/private/Server.php(969): OC\ServerContainer->query('DatabaseConnect...') #12 /var/www/owncloud-org/lib/private/Server.php(215): OC\Server->getDatabaseConnection() #13 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server)) #14 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...') #15 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...') #16 /var/www/owncloud-org/lib/private/Server.php(219): OC\ServerContainer->query('OC\Authenticati...') #17 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server)) #18 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...') #19 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...') #20 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(150): OC\ServerContainer->query('OC\Authenticati...') #21 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(109): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server)) #22 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('OC\Authenticati...') #23 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('OC\Authenticati...') #24 /var/www/owncloud-org/lib/private/Server.php(234): OC\ServerContainer->query('OC\Authenticati...') #25 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server)) #26 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('UserSession') #27 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserSession') #28 /var/www/owncloud-org/lib/private/Server.php(846): OC\ServerContainer->query('UserSession') #29 /var/www/owncloud-org/lib/private/Server.php(454): OC\Server->getUserSession() #30 /var/www/owncloud-org/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server)) #31 /var/www/owncloud-org/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('AppManager') #32 /var/www/owncloud-org/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('AppManager') #33 /var/www/owncloud-org/lib/private/Server.php(1146): OC\ServerContainer->query('AppManager') #34 /var/www/owncloud-org/lib/private/legacy/app.php(284): OC\Server->getAppManager() #35 /var/www/owncloud-org/lib/private/legacy/app.php(105): OC_App::getEnabledApps() #36 /var/www/owncloud-org/lib/base.php(573): OC_App::loadApps(Array) #37 /var/www/owncloud-org/lib/base.php(967): OC::init() #38 /var/www/owncloud-org/console.php(50): require_once('/var/www/ownclo...') #39 /var/www/owncloud-org/occ(11): require_once('/var/www/ownclo...') ### Logs #### Web server error log ``` less /var/log/apache2/error.log [Tue Sep 13 21:26:57.305944 2016] [core:notice] [pid 5827] AH00094: Command line: '/usr/sbin/apache2' [Tue Sep 13 21:33:13.357819 2016] [authz_core:error] [pid 10986] [client 192.168.1.200:36062] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt The problem was discribed here too: https://central.owncloud.org/t/sqlstate-28000-1045-access-denied-for-user-root-localhost-using-password-yes/2305 ```The text was updated successfully, but these errors were encountered: