Install database remote

Hi guys, I have a question?

Can I install the database MySQL in remote server?

Cheers

Hi @Ulises_Ayala

Yes you can. There is a host option in the config.inc.php file that lets you specify a remote address or IP.

Regards
Jason

1 Like

I am doing exactly that, but I am having a lot of problems.

I have OJS version 3.3.0.8 installed in a Ubuntu 20.04 server, that installation with a local mysql works swiftly, but when I change the server to point to a remote Ubuntu 18.04 server the performance goes down from 100% to 1% and I get some error messages.

I tried using a persistent database connection into the config file but nothing seems to get better, the remote server also run another OJS instance with the same local mysql and works perfect. It is an issue attributable to the use of remote connections. Maybe OJS is not tunned to work on a slow connection (1MBbps to 5Mbps), I do not know.

I get this error frequently on apache error.log:

[Thu Nov 18 17:35:22.726065 2021] [php7:error] [pid 1104092] [client 181.58.39.64:4971] PHP Fatal error:  Uncaught Error: Call to a member function getOption() on null in /var/www/testunad.sciocorp.org/public_html/cache/t_compile/aacca70bf961bd2b82901cb61220337a988c609f^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.php:37\nStack trace:\n#0 /var/www/testunad.sciocorp.org/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_6196e3300fe605_17464450()\n#1 /var/www/testunad.sciocorp.org/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode()\n#2 /var/www/testunad.sciocorp.org/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render()\n#3 /var/www/testunad.sciocorp.org/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render()\n#4 /var/www/testunad.sciocorp.org/public_html/lib/pkp/lib/vendor/smarty/smar in /var/www/testunad.sciocorp.org/public_html/cache/t_compile/aacca70bf961bd2b82901cb61220337a988c609f^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.php on line 37, referer: https://testunad.sciocorp.org:8443/

If some dev team member could give us insights about this, I will apritiate that.

Thanks.

Environment:

App server:

  • MySql Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
  • OJS 3.3.0.8

DB server:

  • MySql Ver 14.14 Distrib 5.7.36, for Linux (x86_64) using EditLine wrapper
  • Server upload speed 4.16 Mbit/s

Config file related settings:

;;;;;;;;;;;;;;;;;;;;;
; Database Settings ;
;;;;;;;;;;;;;;;;;;;;;

[database]

driver = mysqli
host = remote.domain.org
username = dbusername
password = DbPassword
name = DbName

; Enable persistent connections
persistent = On

; Set the non-standard port and/or socket, if used
; port = 3306
; unix_socket = /var/run/mysqld/mysqld.sock

; Database collation
collation = utf8_general_ci

; Enable database debug output (very verbose!)
debug = Off

;;;;;;;;;;;;;;;;;;
; Cache Settings ;
;;;;;;;;;;;;;;;;;;

[cache]

; Choose the type of object data caching to use. Options are:
; - memcache: Use the memcache server configured below
; - xcache: Use the xcache variable store
; - apc: Use the APC variable store
; - none: Use no caching.
object_cache = none

; Enable memcache support
memcache_hostname = localhost
memcache_port = 11211