Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ownCloud Setup: SQLSTATE[HY000][1045] Access denied for user 'owncloud'@localhost' (using password:YES)

Tags:

mysql

owncloud

I wanted to setup my owncloud installation on my raspberry pi 2. So, I created an mysql database and user.

CREATE DATABASE owncloud;

CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'Password';
GRANT ALL PRIVILEGES ON owncloud. * TO 'owncloud'@'localhost';
FLUSH PRIVILEGES;

After I type all nessesairy parameters into the webinterface of the owncloud-setup, I recevied:

Error while trying to create admin user: Failed to connect the database: An exeption occured in driver: SQLSTATE[HY000][1045] Access denied for user 'owncloud'@'localhost' (using password:YES)

Sadly, my resent sreach on similar topics didn't result in any functional hint on this problem. So, I would be happy about further suggestions.

like image 751
user2509663 Avatar asked Jun 08 '16 12:06

user2509663


2 Answers

  1. Look at this: https://doc.owncloud.org/server/9.0/admin_manual/installation/installation_wizard.html#database-choice
  2. In Terminal: mysql_upgrade --force -u root -p
  3. Use administrative MySQL »root«-user and password with the Installation Wizard
  4. Check that the Database not exist which you create with the Installation Wizard
  5. If nothing helps, start with sqlite, then migrate to mysql like this: https://doc.owncloud.org/server/9.0/admin_manual/configuration_database/db_conversion.html
like image 92
Thomas Kühnert Avatar answered Nov 06 '22 20:11

Thomas Kühnert


Just replace localhost for 127.0.0.1 in Owncloud's setup form for MySQL as mentioned in comments above by Askaga

like image 28
Ilya Rusin Avatar answered Nov 06 '22 18:11

Ilya Rusin