1

Topic: MySQL port number

How do I set the MySQL port number?

Is it like this:

$db_host = 'localhost:1234';

???

If so then it doesn't seem to work but maybe I'm overlooking something.

2 (edited by elbekko 2006-12-15 19:12)

Re: MySQL port number

That should work yes.

And as far as I can see, PunBB fully supports port numbers.

3

Re: MySQL port number

So if I'm moving to a new MySQL server WITHOUT reinstalling PunBB, then is there any edits in the database that are necessary?

I ask because right now it doesn't work. I have two MySQL server running, one on port 3306 (default for MySQL) and one on port 3399. When I edit the PunBB config file to use 'localhost:3399' the forum still somehow uses the MySQL server on port 3306 !

Why is this?

Re: MySQL port number

No idea tongue It should use the settings in config.php =/
Maybe you're just not noticing it?

5

Re: MySQL port number

I tested it. I have a copy the punbb database on both servers. Posting to one server shows up on both server, which means both instances of punbb is using ONE database server. Therefore it's not using the 'localhost:3399' setting for some reason.

Re: MySQL port number

Then it's most likely an issue with your setup: PunBB simply passes the host to mysql_connect, which takes a port number.
I doubt this will help, but ensure that sql.safe_mode is disabled (since it will override the config.php parameters).
Can you connect to the different MySQL servers and insert things without one affecting the other?