For OJS in the [database] section in config.inc.php I can set the following options:
driver = mysql host = "my_db_host.domain.org" username = my_db_username password = "*****" name = my_db
By default the MySQL connection port is 3306. I need to use a custom port. How can I define my custom connection port in the [database] section in config.inc.php?
In lib/pkp/lib/adodb/adodb.inc.php I can see this: hostspec: Host specification (hostname[:port]). Does this mean that setting host in config.inc.php to something like host = "my_db_host.domain.org:12345" will do the trick?
I haven’t tried it yet, haven’t had time to set up a test environment and was looking for an obvious answer that I’ve missed somewhere. I’ts strange that no one has ever run into this issue before.
I’ve just tried it and it works. The database connection port can be appended to the database host after a colon in config.inc.php like this: host = "my_db_host.domain.org:12345"
Please update the documentation to add this feature. It looks like it’s currently nowhere to be found.
This is exactly the thing. Following two lines need to be added there, so the query is going to be correctly build in the Illuminate Database component for connections on custom ports / sockets. 'port' => Config::getVar('database', 'port'), 'unix_socket'=> Config::getVar('database', 'unix_socket'),
These properties could be then set in config file…
I’ll try to contrib on Github, it’s for my first time :). Don’t you know how I could create or find an issues for this bug?