Problem with GUI Nextcloud install

After i do all the steps in the documentation in manual install i have a problem with GUI install. When i try to make a admin acc and database appears this problem -> nextcloud failed to connect to the database sqlstate hy000 1698 (SQLSTATE[HY000] [1698] Access denied for user ‘root’@‘localhost’) i also tried with different usernames but same. I made a fresh Ubuntu 16.04 LTS install a do all the manual install steps in documentation and same … Can someone help me ?

Did you set the password for MySQL during installation? Note MySQL user is: root

If not, this tutorial should work and help you resetting it.

You don’t need to start and stop the services

No during install i don’t set any passwords. I will read and try this from the link :slight_smile:

Same after tried the tutorial from the link .

I had the same problem some times. I’m not sure how i fixed it. I think i reinstalled MySQL or mariadb till I was asked for a root password.

This problem is not related to Nextcloud, its related to MySQL

I will try with ubuntu 14.04 LTS beacause before upgrading to nextcloud and ubuntu 16.04 LTS i have perfectly workinkg owncloud server on 14.04 :slight_smile:

@mailo95 thats not the problem… :smile: i had the problem on debian 8. The OS has nothing to do with this behaviour.

Yep but on 16.04 LTS in install process this step - >(At the installation of the MySQL/MariaDB server, you will be prompted to create a root password. Be sure to remember your password as you will need it during Nextcloud database setup.) is missing :slight_smile: Now i make a fresh install of 14.04 LTS and don’t have any problems :slight_smile:

In this case you should try to install an older version of MySQL :laughing: not reinstalling the hole system

Yep maybe you are right but i don’t know how to install older version of MySQL :smile:

An option could be to purge the existing MySQL of your system (which will also remove any config files) and then re-install. That should trigger the root password question again.

Or run the dpkg reconfig command

sudo dpkg-reconfigure mysql-server-5.5

Make sure to use the correct version number, which you can extract with:

dpkg -l | grep mysql

@StephanW i think MySQL isn’t even asking for the root password

@mailo95 just google you need to add unofficial repos to get it

Another method is using the command:

sudo mysql_secure_installation

It will show:


In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here.
Enter current password for root (enter for none): (here press Enter)

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation.

Set root password? [Y/n] y   (press 'y' to set new password)
New password: 
Re-enter new password:
Password updated successfully! Reloading privilege tables.. ... Success!