Database Error SQLSTATE[HY000] [2002] Connection refused

Dear Neos family,
I’ve started to create a NEOS project today.
Everything worked fine until I wanted to create a new Database in the Setup.
Working on a macbook pro with macOS Sierra installed.

Here’s what I get from Neos:

Could not connect to database
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused

Thanks for your Help !

Mh, hard to guess. But you didn’t specify a password and probably your database backend doesn’t like it?

Also be aware of the difference between and localhost one uses sockets and the other tcp, so just one of the two might work for your setup.

Hi, I’m also experiencing the same issue. Installed neos today through docker based on the docs. I’m on Windows 10 and Docker Desktop. The user root has all privileges on all hosts. or localhost - makes no difference. What am I missing?

I think you cannot use the user “root”, try creating a new database user with all privilegies.

I had the same “root” user problem. It seems that for example maria db doesnt allow access with the root for security reasons or something…

Maybe there could be a check implement by neos that warns you if the username ‘root’ is choosen.

In between I have learned why: db host is somewhat misleading in the docs, because you have a service for mariadb, so the host instead of being or localhost, has to be the container_name of the mariadb service, and for that you have to define that (watch out that the indentation in blockquotes is not correct):

image: mariadb:10.3
container_name: mariadb
- db:/var/lib/mysql
- 13306:3306

after that you can add the name mariadb to DB Host in the form and you are good to go.