Nextcloud DSM 6.2.2

Good day. Faced a problem with MariaDB. Poke your nose where you made a mistake, did everything according to the instructions.
But as a result, an error occurs on the setup completion screen (when creating the admin user): Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE [HY000] [2002] Connection refused!

Thanks in advance!

This is what the beautiful search forum of the forum returns - if you use it - :wink:

I’m not very clear, could you poke me in the right direction?

Follow the provided link and read the existing articles. You will never find aready-to-use solution without doing your part of the job :wink:

Everything is complicated by the fact that I understand English very poorly, and there is almost no information in Russian (

I found a similar problem, but I don’t understand how exactly the author of this topic solved the problem

The mentioned thread has nothing to do with the database connection problem. I would start with the described checks here:

on DSM 1, MariaDB user is root. The service is up and running, through phpMyAdmin I go in and can create a database. I can’t understand why Nextcloud doesn’t connect

What is the output of each of the described sql commands?

login as: advkosse
advkosse@’s password:
Could not chdir to home directory /var/services/homes/advkosse: No such file or directory
advkosse@Advkosse_DS:/$ MariaDB [(none)]> select user,host from mysql.user;
-sh: syntax error near unexpected token (' advkosse@Advkosse_DS:/$ MariaDB [(none)]> select user,host,db from mysql.db; -sh: syntax error near unexpected token (’

Commands for DSM is not also default linux, and I cannot find all commands for DSM

Would it be possible that you’ve tried to enter “MariaDB [(none)]> select user,host,db from mysql.db;” on the console? If yes, it seems that you haven’t got much database knowledge, have you?
The described commands are sql commands which can only be executing when you’ve already established a successful database connection. You first have to execute the “mysql” command on the console. Once you’ve executed it, you should see the database prompt “MariaDB [(none)]>”. At this prompt you need to enter the sql command, e.g. “select user,host,db from mysql.db;”.