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!
%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA|200x500

Thanks in advance!

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

https://help.nextcloud.com/search?q=SQLSTATE%20%5BHY000%5D%20%5B2002%5D%20Connection%20refused

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@192.168.1.121’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 (’
advkosse@Advkosse_DS:/$

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;”.