[Maintain] Changing MySQL port

Fox, Sam P spfox at bendbroadband.net
Thu Oct 11 16:58:28 UTC 2007

Thank you Dawn!  I'm trying this now.

-Sam Fox

-----Original Message-----
From: Dawn Keenan [mailto:dkeenan at uwaterloo.ca] 
Sent: Thursday, October 11, 2007 9:54 AM
To: Fox, Sam P
Cc: maintain at osuosl.org
Subject: Re: [Maintain] Changing MySQL port

Fox, Sam P wrote:
> Hello everyone,
> The mysql instance for maintain on our server is listening on 3307
> rather than the standard port 3306.  I found mention of the database
> connection in lib.php but I don't see an option for port number.
> configuration files do I need to change so that maintain connects on
> 3307?  Here's the line from php.ini that I'm referring to:
> Line 139:
> $dbh = mysql_connect($dbinfo['host'], $dbinfo['username'],
> $dbinfo['password']);

The first parameter of mysql_connect can include an optional port 
number.  I haven't tried it myself lately, but you should be able to 
define your database server as "host = mysqlserver:3307" in the 
[database] section of maintain.cfg.

I discovered through trial and error that using a hyphen as part of your

database name is a bad idea, as it causes difficult to track connection 


More information about the maintain mailing list