Welcome Guest, Not a member yet? Register   Sign In
Mysql Alternate port
#11

[eluser]percent20[/eluser]
I actually did try that and for some reason it didn't work as I assumed it was using mysql_connect but because I didn't know how the CI framework handled it when it didn't work I just figured CI did something hinky with the information and what I added was malformed.

I did however go against the advise just out of pure curiosity because I need to figure out how CI works under the hood and got a solution to work with 2 lines adding it to 2 places.

mysql_driver.php - Before
Code:
function db_connect()
{
    return @mysql_connect($this->hostname, $this->username, $this->password, TRUE);
}


mysql_driver.php - After
Code:
function db_connect()
{
    $port = ($this->port == '') ? '' : ":".$this->port;
        
    return @mysql_connect($this->hostname.$port, $this->username, $this->password, TRUE);
}

And I did that to db_pconnect() function too.

So now it can use the $db['defualt']['port'] = "portnumber"; just fine

edit: I did a little revision looking and it looks like i typed in the hostname wrong when I originaly tried to do the port so it was my bad. Hopefully this will be a non-issue in the future as it can be done both ways.


Messages In This Thread
Mysql Alternate port - by El Forum - 07-26-2008, 04:54 PM
Mysql Alternate port - by El Forum - 07-26-2008, 05:32 PM
Mysql Alternate port - by El Forum - 07-26-2008, 06:06 PM
Mysql Alternate port - by El Forum - 07-26-2008, 06:34 PM
Mysql Alternate port - by El Forum - 07-26-2008, 07:31 PM
Mysql Alternate port - by El Forum - 07-26-2008, 07:35 PM
Mysql Alternate port - by El Forum - 07-26-2008, 07:49 PM
Mysql Alternate port - by El Forum - 07-26-2008, 10:43 PM
Mysql Alternate port - by El Forum - 07-26-2008, 10:55 PM
Mysql Alternate port - by El Forum - 07-26-2008, 11:00 PM
Mysql Alternate port - by El Forum - 07-27-2008, 01:35 AM
Mysql Alternate port - by El Forum - 07-27-2008, 08:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB