473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Multiple servers on a single host question

I have a single instance of MySQL package installed on FreeBSD. I run 2
servers. The second server is run with this command:

shell> mysqld_safe --defaults-extra-file=/root/my2.cnf &

some /root/my2.cnf file entries:
port = 3307
socket = /tmp/mysql2.sock

Both servers co-exist peacefully except:

shell> mysql --socket=/tmp/mysql2.sock [accesses second server
happily]

***BUT***

shell> mysql --port=3307 [accesses the first server and not the
second!!]

Does that mean that the first server's port 3306 is hard-coded into
MySQL ?

Is this a bug ?

Or am I missing something ?

What is the work-around ?

Mike

Jul 23 '05 #1
2 1310
>Both servers co-exist peacefully except:

shell> mysql --socket=/tmp/mysql2.sock [accesses second server
happily]

***BUT***

shell> mysql --port=3307 [accesses the first server and not the
second!!]

Does that mean that the first server's port 3306 is hard-coded into
MySQL ?
The default port is coded into MySQL. I don't see this as a problem.
Is this a bug ?


The port used is irrelevant if it's using the unix-domain socket.
It uses the unix-domain socket instead of the port if the host
is specified as or defaults to 'localhost'.

If you want to use the second server, specify BOTH the socket and
the port for the second server, which works regardless of
whether "--host localhost" or "--host my.server.com" is being
used.

Gordon L. Burditt
Jul 23 '05 #2


Gordon Burditt wrote:
Both servers co-exist peacefully except:

shell> mysql --socket=/tmp/mysql2.sock [accesses second server
happily]

***BUT***

shell> mysql --port=3307 [accesses the first server and not the
second!!]

Does that mean that the first server's port 3306 is hard-coded into
MySQL ?
The default port is coded into MySQL. I don't see this as a problem.
Is this a bug ?


The port used is irrelevant if it's using the unix-domain socket.
It uses the unix-domain socket instead of the port if the host
is specified as or defaults to 'localhost'.


I see. Thank you.
If you want to use the second server, specify BOTH the socket and
the port for the second server, which works regardless of
whether "--host localhost" or "--host my.server.com" is being
used.

Gordon L. Burditt


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Captain Ranger McCoy | last post by:
Hello! Suppose I have ten servers at ten ips: x.x.x.1 x.x.x.2 x.x.x.3 x.x.x.4 and so on Each server hosts 100+ photo galleries, all under a single domain name,
1
by: Mark McKay | last post by:
I've been reading 'Java RMI' from O'Reilly, and it provides a nice example of scaling a server application by creating multiple instances of server objects on several distinct machines (each...
9
by: Abhishek Srivastava | last post by:
Hello All, In IIS 6.0 We have a concept of worker processes and application pools. As I understand it, we can have multiple worker process per appliction pool. Each worker process is dedicated...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
3
by: Henrik Dahl | last post by:
Hello! From default, the ASPNET user is giving the process identity for the ASP.NET runtime environment of IIS, however it's possible to change the user by modifying the <processModel> element...
9
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
14
by: Mattia | last post by:
I have a very big problem. I must send a single mail to multiple receivers. The number of receivers are very big: approximately 6000 users, but this number increase each year. I find a lot of...
35
by: keerthyragavendran | last post by:
hi i'm downloading a single file using multiple threads... how can i specify a particular range of bytes alone from a single large file... for example say if i need only bytes ranging from...
13
by: Samir Chouaieb | last post by:
Hello, I am trying to find a solution to a login mechanism for different domains on different servers with PHP5. I have one main domain with the user data and several other domains that need...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.