Forum

Notifications
Clear all

MySQL Custom Port  

  RSS
Neris
(@neris)
New Member

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?

Quote
Posted : 15/05/2019 11:10 am
Sheepcontrol
(@sheepcontrol)
Member Admin

Open this file: "includes/mysqli_functions.php"

Change

function dbconnect($dbhost, $dbuser, $dbpass, $dbname ) {
$mysql_access = new mysqli($dbhost, $dbuser, $dbpass, $dbname);

to

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.

ReplyQuote
Posted : 19/05/2019 4:32 pm
Neris
(@neris)
New Member

I haven't tried it yet, but thank you very much!  😀

ReplyQuote
Posted : 20/05/2019 3:32 pm
Share: