MySQL Custom Port

· 3 · 587
*

Neris

  • *
  • Posts: 2
    • Black Haze
MySQL Custom Port
« on: May 15, 2019, 09:10:22 am »
Hi,
I had a big problem installing eFiction on my OVH hosting. In the end, I 'solved' it by installing eFiction on the horrible database included in the hosting and not on my Private SQL (a VPS only for databases). But in the future, I'll surely need to move it on my Private SQL. The problem is that the Private SQL uses a custom port... and eFiction cannot read the database. Is there a way to solve the problem?

*

Sheepcontrol

  • *****
  • Posts: 317
Re: MySQL Custom Port
« Reply #1 on: May 19, 2019, 02:32:45 pm »
Open this file: "includes/mysqli_functions.php"

Change
Code: [Select]
function dbconnect($dbhost, $dbuser, $dbpass, $dbname ) {
$mysql_access = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
to
Code: [Select]
function dbconnect($dbhost, $dbuser, $dbpass, $dbname ) {
$mysql_access = new mysqli($dbhost, $dbuser, $dbpass, $dbname, 3399);
(3399 or whatever your port is).

Ugly as can be, but will work.
eFiction 5 (which is being worked on, despite me being rather silent lately) will allow custom ports from the get go.
I speak the worlds most widely used language: bad english

*

Neris

  • *
  • Posts: 2
    • Black Haze
Re: MySQL Custom Port
« Reply #2 on: May 20, 2019, 01:32:07 pm »
I haven't tried it yet, but thank you very much!  :-D