Hi,
With the latest stable 11, when you unmask the MySQL DB password in the installation screen and submit it, an error is shown like this:
_Access denied for user 'xxxx'@localhost' (using password:YES)_
However, when submitting with a masked password, it works fine. This can be quite critical as new users who want to try out Nextcloud might get frustrated by spending time to search for MySQL config problems when it actually isn't one.
Seems some others have the same problem:
https://help.nextcloud.com/t/install-wizard-database-errors-access-denied-for-root/2854/8
I just did both requests and this is the diff:

Fix is in #3403
Thanks a lot @MorrisJobke
Hey, can someone give me a workaround?
I have been trying to set this up for hours now, but I can't get past the first install wizard screen.
I get the above error with the PW checked or not. I get the error although the user is created in MariaDB.
Don't know what to do anymore...
The workaround is:
This is still a problem for me. Here's what happens:
oc_<username given as admin> is also createdError while trying to create admin user: Failed to connect to the database: An exception occured in driver: SQLSTATE[42000] [1044] Access denied for user 'oc_<username>'@'localhost' to database '<database>'I have tested this using Nextcloud 10, and the tips from master and stable11, and it happens regardless of whether I mask the password or not.
My setup:
10.0.25-MariaDB1.9.35.6.11-1ubuntu3.4The following lines have been added to my MySQL configuration:
innodb_file_per_table=true
innodb_file_format=barracuda
innodb_large_prefix=on
transaction-isolation = READ-COMMITTED
This issue appears to not be fixed. It should probably be reopened.
By the way, I'm curious: Why does Nextcloud attempt to create a new MySQL user here? Why not just use the one I set up for it?
This issue also occurs if I use the web-based setup tool (the one that downloads nextcloud for you).
The new user has very restricted access and is bound to that one database only. This helps in case your server was compromised, because the hacker does not have a superadmin on the database
Seems like it must be too restricted, then..
Is there any way for me to work around this, eg by doing it myself?
I managed to work around this by setting up with SQLite and converting the database using the occ tool as described on this page.
A month later and still no real solution for a fresh installation?
@JeffZwolle ?
Maybe I should elaborate. I did an install of Nextcloud v11 on Ubuntu 16.04 desktop and followed the manual at https://docs.nextcloud.com/server/11/admin_manual/installation/source_installation.html
Yes, the problem was the install of mariadb-server. It is however unclear to me why that was the problem in the first place and why so many more people had this problem.
I've just had the same problem with Nextcloud 12.0.0 on Ubuntu 16.04, following the manual installation instructions on the Nextcloud Web site but I also ran mysql_secure_installation. I probably said"yes" to "prevent remote root login." My workaround was to create a new user account and give them rights to everything, then use that account in the Web-based setup tool.
For those like me and @gdude2002 who were having trouble with Nextcloud not being able to establish new users on the database, this should solve it for you. If the root user isn't working, create a new SQL user with the following commands:
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'admin'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
The important part that you might have been missing was WITH GRANT OPTION which allows that user to further grant new permissions to new users.
Now use that new user as the database user in the GUI admin setup. You can also browse to /var/www/nextcloud/ (or wherever you copied the nextcloud directory) as a non-root user and execute the following command, replacing values as appropriate:
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "nextcloud" \
--database-host "localhost" --database-user "admin" --database-pass "some_pass" \
--admin-user "user" --admin-pass "password" --data-dir "/opt/nextcloud/"
Most helpful comment
For those like me and @gdude2002 who were having trouble with Nextcloud not being able to establish new users on the database, this should solve it for you. If the root user isn't working, create a new SQL user with the following commands:
The important part that you might have been missing was
WITH GRANT OPTIONwhich allows that user to further grant new permissions to new users.Now use that new user as the database user in the GUI admin setup. You can also browse to
/var/www/nextcloud/(or wherever you copied thenextclouddirectory) as a non-root user and execute the following command, replacing values as appropriate:Source