Jump to content

Is it possible to have more than one mysql servers on one computer ?


jd2007

Recommended Posts

Not sure but I think you can. What you'll want to do is install them on different ports/sockets, such as 3306 and 3307

 

then when you connect to one of the databases you'd supply the port/socket for the server in mysql_connect

 

eg:

$server1 = mysql_connect('localhost:3306', 'root'); // server 1 runs on port 3306 (default installation port)
$server2 = mysql_connect('localhost:3307', 'root'); // server 1 runs on port 3307

The number after the : defines the port number.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.