Error database conection Digital Ocean

Hi, I am trying to install an OJS 3.3.0-13 with a connection to a managed database in Digital Ocean but I get the following error:

[Thu Nov 17 19:10:29.447146 2022] [php7:notice] [pid 29116] [client 162.158.91.189:64030] SQLSTATE[HY000] [2002] Connection timed out (SQL: create table announcement_types (type_id bigint not null auto_increment primary key, assoc_type smallint not null, assoc_id bigint not null) default character set utf8 collate ‘utf8_general_ci’), referer: https:
[Thu Nov 17 19:12:53.228491 2022] [php7:notice] [pid 29250] [client 162.158.91.189:55754] SQLSTATE[HY000] [2002] Connection timed out (SQL: create table announcement_types (type_id bigint not null auto_increment primary key, assoc_type smallint not null, assoc_id bigint not null) default character set utf8 collate ‘utf8_general_ci’), referer: https://

Initially, the host name I got from Digital Ocean was 63 characters long, so the web installer would not accept it. By CLI it showed error. I forked the database to shorten the name, but it still shows error.

Maybe this can help you https://docs.digitalocean.com/support/when-connecting-to-my-database-i-get-a-connection-timed-out-error/ .

Regards
PKP Team

1 Like

Hi, thanks @touhidur.

The error comes from this side. The installer uses the default port and Digital Ocean uses a custom one. I used the first recommendation mentioned here and at least it no longer throws TimeOut and the installation runs.
What I have done is to add to the hostname, the port :21036

But in the link it is recommended to edit the BaseQueryBuilder.inc.php file but in the OJS 3.3.0-13 version I can’t find it in the same place. Can you tell me where it is to edit it?

Dear @touhidur, is it possible that the connection port definition is in some of these folders?

/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/