Notifications
Clear all

Adding Combu server to a Synology NAS?

(@derkoi)
Active Member Registered

Hi,

I'm trying to set up Combu server on my Synology NAS. I'm following the step by step guide but I'm stuck at the part where I login via http://localhost/combu/admin.

I get the error message: Could not connect to database: Connection refused

I'm using MariaDB 10 & I've created the database via phpMyAdmin

Here's some info:

Database server:

Server: MariaDB 10 (Localhost via UNIX socket)
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.3.21-MariaDB - Source distribution
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

Web Server:

nginx/1.16.1
Database client version: libmysql - mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation
PHP version: 5.6.40

I've tried various different options in the config.php file but to no avail. Any ideas please?

Thanks

ReplyQuote
Topic starter Posted : 10/06/2020 6:49 pm
(@skaredcreations)
Prominent Member Admin

If your using "localhost" as database host then try to use "127.0.0.1" (that conceptually means the same thing since "localhost" is usually a hostname that points to the local IP addess 127.0.0.1, but on some server configuration you may need to use the explicit IP address instead of the hostname).

Also, as security notice: using "root" as user to access a database (whatever engine is it) is a very bad practice about security, you should create a specific user that can select/insert/update/delete only on the database(s) that you need to access from your application. In phpMyAdmin there a page to create users and grant access permissions to the registered database.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/06/2020 7:02 pm
(@derkoi)
Active Member Registered

Thanks, I've tried both.

Using localhost gives this error: Could not connect to database: No such file or directory

ReplyQuote
Topic starter Posted : 10/06/2020 7:04 pm
(@skaredcreations)
Prominent Member Admin

Ok so if you're using 127.0.0.1 instead of "localhost" then may be that you should also add the hostmask "root@127.0.0.1", but I suggest to create a specific user instead of using root as said in the above reply.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/06/2020 7:06 pm
(@derkoi)
Active Member Registered

Just looking here at the moment, but nothing is working

https://stackoverflow.com/questions/45254222/getting-error-sqlstatehy000-2002-connection-refused-on-nas-synology

ReplyQuote
Topic starter Posted : 10/06/2020 7:08 pm
(@skaredcreations)
Prominent Member Admin

@derkoi if you need I can help you in a text chat on Skype or hangout, connection refused is usually due to the user hostmask or source IP being blocked by MySql. I'll send you my Skype ID in a PM.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/06/2020 7:10 pm
(@derkoi)
Active Member Registered
Posted by: @skaredcreations

Ok so if you're using 127.0.0.1 instead of "localhost" then may be that you should also add the hostmask "root@127.0.0.1", but I suggest to create a specific user instead of using root as said in the above reply.

Hi,

I tried that with the user 'combu_admin' define ("GAME_DB_SERVER", "combu_admin@127.0.0.1"); & received this error:

Could not connect to database: php_network_getaddresses: gethostbyname failed. errno=0

ReplyQuote
Topic starter Posted : 10/06/2020 7:11 pm
(@skaredcreations)
Prominent Member Admin

@derkoi GAME_DB_SERVER must be the IP address or hostname of your MySql server, I was talking about the username (but you cannot specify the hostmask of the connecting user because it's automatically handled by MySql upon connection). I'm sending my Skype ID and Hangout ID in a PM so I can help you to solve this quicker.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/06/2020 7:14 pm
(@skaredcreations)
Prominent Member Admin

For others having this same problem with MariaDB: you should verify that TCP/IP connection is enabled and GAME_DB_PORT in your config.php matches the port that is listened by MariaDB. As said in the last answer to the above post on stackoverflow, you may do that by opening the MariaDB 10 options in the Synology Package Center.

FRANCESCO CROCETTI @ SKARED CREATIONS

ReplyQuote
Posted : 10/06/2020 8:00 pm
Share: