You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createuser 'next'@'localhost' identified by 'secret';
grant all privileges on*.* to 'next'@'localhost';
flush privileges;
Create database:
createdatabasenext;
Attempt to install Nextcloud in Web browser:
Username: [any]
Password: [any]
Data directory: [default]
Database user: next
Database password: secret
Database name: next
Database host: localhost:5432
Expected behaviour
Install should happen as normal, with the specified database user. Nextcloud should not attempt to add its own user if grant permission is missing.
Actual behaviour
Error message in Web browser:
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user 'oc_next'@'localhost' to database 'next'
Subsequent error messages:
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user 'oc_next1'@'localhost' to database 'next'
oc_next2 etc.
Server configuration
Operating system: Ubuntu 16.04.5 LTS
Web server: Apache/2.4.18
Database: mysql Ver 15.1 Distrib 10.0.36-MariaDB
PHP version: PHP 7.2.14
Nextcloud version: (see Nextcloud admin page) 53c077afc9077dcadcaf4b8ad62590fb549947b0
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: directly from GitHub repository
Details
This bug occurs because the database user created for Nextcloud has permission to create new users, but is not allowed to grant permissions.
If privileges are granted with grant option, the install proceeds as expected (Nextcloud adds its own user):
grant all privileges on*.* to 'next'@'localhost' with grant option;
Steps to reproduce
Username: [any]
Password: [any]
Data directory: [default]
Database user:
next
Database password:
secret
Database name:
next
Database host:
localhost:5432
Expected behaviour
Install should happen as normal, with the specified database user. Nextcloud should not attempt to add its own user if grant permission is missing.
Actual behaviour
Error message in Web browser:
Subsequent error messages:
oc_next2
etc.Server configuration
Operating system: Ubuntu 16.04.5 LTS
Web server: Apache/2.4.18
Database: mysql Ver 15.1 Distrib 10.0.36-MariaDB
PHP version: PHP 7.2.14
Nextcloud version: (see Nextcloud admin page)
53c077afc9077dcadcaf4b8ad62590fb549947b0
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: directly from GitHub repository
Details
This bug occurs because the database user created for Nextcloud has permission to create new users, but is not allowed to grant permissions.
If privileges are granted
with grant option
, the install proceeds as expected (Nextcloud adds its own user):The bug is also described by this user: https://help.nextcloud.com/t/mariadb-refuse-me-sqlstate-hy000-1044-access-denied-for-user-oc-sylvain-to-database-nextcloud/35677
The text was updated successfully, but these errors were encountered: