Jump to content
Froxlor Forum
  • 0

MySQL custom port


draggy

Question

I cannot figure out how to define a custom port for mysql.

 

In lib/userdata.inc.php I've tried using $sql['host']='ip:port'; and also using $sql['host']='ip'; $sql['port']='port';

These don't work, when I try it says "Can't connect to MySQL server on".It only seems to work if my sql server is using the default port. I have also confirmed that I can connect to the custom port from a client. Can I not specify a port?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

I looked this up in the current git version of froxlor and there seems to be no way to simply add an port. But you could modify the database class:

 

/var/www/froxlor/lib/classes/database/class.Database.php - Line 265

                $dbconf["dsn"] = array(
                                'dbname' => $sql["db"],
                                'charset' => 'utf8',
                                'port' => '3333' // add your custom port here
                );
Link to comment
Share on other sites

That worked, thanks. I'm kind of surprised that you can't specify a port in the setup.

 

Because 99,9% of the users do not need to specify a port...froxlor is supposed to be installed with a "standard" apache/php/mysql installation

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...