I’m setting up Nextcloud on an Ubuntu Server (18.10) using a LEMP stack. I’ve installed Nextcloud but when I try to finish I get an error message that reads:
Error when trying to create admin user:
Failed to connect to the database: An
exception occurred in driver:
SQLSTATE[HY000] [1698] Access denied
for user ‘root’@‘localhost’
I’m sure I’m missing a simple setting but I can’t figure out where. Can anyone help?
This simple step is essential if you want to access a database. You need to provide a valid database administrator account so that the installation can be done. You’ve not written which database you’re using but if it is e.g. MariaDB you should check-out how to administer users and access rights on the folliwng page: https://mariadb.com/kb/en/library/user-account-management/
The following SQL command e.g. will show you the list of existing database users:
# mysql -e "use mysql;SELECT user,host,select_priv,insert_priv,grant_priv FROM user;"
I’m so sorry, I
don’t remember what settings I tweaked, but if you check out linuxbabe.com, she has an excellent tutorial, and responds to
questions and pleas for help quickly. No affiliation, just a
very satisfied user.