SQLSTATE[HY000][1044] Access denied

Steps to reproduce

  1. Install nginx
  2. Install Owncloud
  3. Install PHP
  4. Connect to owncloud

Expected behaviour

I’m trying to create admin account for first time

Actual behaviour

On the owncloud page for the first time, I try to create an admin account and there is an error :
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000][1044] Access denied for use ‘oc_mycloud’@‘localhost’ to database ‘owncloud’

Server configuration

Operating system:

Web server:
nginx

Database:
MySQL

PHP version:
PHP7.0

ownCloud version: (see ownCloud admin page)
10.0.10.4

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
using shell command

Signing status (ownCloud 9.0 and above):

The content of config/config.php:

List of activated apps:

Are you using external storage, if yes which one:

Are you using encryption:

Are you using an external user-backend, if yes which one:

Client configuration

Browser:

Operating system:

Logs

Web server error log

ownCloud log (data/owncloud.log)

Browser log

Hey,

have you tried to give the required access permissions to the database like outlined in the documentation?

https://doc.owncloud.org/server/administration_manual/configuration/database/linux_database_configuration.html

I have grant the Privileges using below cmd but still having the Error message:
CREATE DATABASE IF NOT EXISTS owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO ‘username’@‘localhost’ IDENTIFIED BY ‘password’;

My silly mistake. Just found out that I made some typo in the mysql database.