Docker installation on Synology Diskstation

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
lukasspy
Posts: 1
Joined: Fri Aug 16, 2019 3:53 pm

Docker installation on Synology Diskstation

Post by lukasspy » Fri Aug 16, 2019 4:07 pm

Hi there,

the Synology Diskstation has a Docker app. I pulled the official dockerfile. Starting it up works just fine, but with SQLlite.
So I added the variables for mysql. I created the database, user, password. mysql is provided by MariaDB10 on the Diskstation.
The port is 3307 and the socket is /run/mysqld/mysqld10.sock or /run/mysqld/mysqld.sock
So my envirenment variables are:

MAYAN_DATABASE_ENGINE = django.db.backends.mysql
MAYAN_DATABASE_NAME = mayan
MAYAN_DATABASE_USER = mayan
MAYAN_DATABASE_PASSWORD = password
MAYAN_DATABASE_HOST = localhost
MAYAN_DATABASE_PORT = 3307

When I start up the container with the message.
django.db.utils.OperationalError: (2002, 'Can\'t connect to local MySQL server through socket \'/var/run/mysqld/mysqld.sock\' (2 "No such file or directory")')

=> i suppose that this is because the socket is located at /run/mysqld/mysqld.sock and not /var/run/mysqld/mysqld.sock ?!?!?!

when I try to use 127.0.0.1 instead of localhost I get the following message
django.db.utils.OperationalError: (2003, 'Can\'t connect to MySQL server on \'127.0.0.1\' (111 "Connection refused")')

I hope anyone can help me here.
Is there a way to add the socket as a variable MAYAN_DATABASE_SOCKET or something like that?

Please help me :-)

Thanks in advance

(I read the other question about the synology diskstation. I think it is the same problem, but I hope that anyone can help me, since I added some more information about the errors .. )

nate7475
Posts: 3
Joined: Fri Aug 23, 2019 11:30 pm

Re: Docker installation on Synology Diskstation

Post by nate7475 » Sun Aug 25, 2019 10:46 pm

A socket is just the term for ip + port

So,
ip 192.168.1.10
port 3307
socket 192.168.1.10:3307

What your error message is saying is that it's looking at the ip you listed and the port, and it's not there. What you can do is go to your database container and see what port it's listening on as you'll want to double check that it's actually 3307.

Post Reply