Nextcloud installation: Error while trying to create admin user


I am trying to install NC 12 on a Synology DS 216j with Apache 2.2, PHP 5.6, MariaDB 10 following this guide:

After starting the setup I get the following message:
Error while trying to create admin user: Failed to connect to the database: An exception occured in driver:
SQLSTATE[HY000][2002] No such file or directory

Any idea? Thank you very much for your help.


umm… good plan to have your data at home. so welcome to nc!

your error reads to me as if there’s a problem with your database. does it really exist?


Thank you. Problem is solved (MySQL bind only allows as address and MariaDB listens to port 3307)


Yes. Just type in “” at “localhost”. That’s the solve! Thanks alot!


If you use the nextcloud docker image, you need to enter just db as hostname.



Jesus, I’ve been trying to get this working for hours, and this worked. I wish it was better documented.


I tried with typing it but still it shows connection refused and I created docker image with localhost:8065