You can't specify multiple IPs for bind-address.

Let's back up. You want to run both 4.0 and 5.0, and you want to be able to set it up so it's 'easy' to connect to each separate instance, i.e. without having to specify different ports. This is pretty easy to do. In this case you use separate configurations for each instance (5.0 has an instance manager for this, but you can start mysql server with any arbitrary configuration file or configuration options).

An example:

start each
mysqld4 --bind-address=192.168.1.1 (more options for each basedir, datadir, etc) mysqld5 --bind-address=192.168.1.2 (more options for each basedir, datadir, etc)

Now if 192.168.1.1 resolves to mysql4.somedomain.com, you simply connect to that for version 4, and mysql5.somedomain.com for version 5.

If you want one copy to -only- listen locally and not be accessible from an external IP, you can use --bind-address=127.0.0.1 (or some other internal-only IP). Alternatively you can use --skip-networking to not use TCP/IP, and connect to your 'local-only' copy via a socket/name pipes.

See: http://dev.mysql.com/doc/refman/4.1/en/server-options.html
and: http://dev.mysql.com/doc/refman/4.1/en/option-files.html

If this were me, I would create two configuration files, my4.cnf and my5.cnf with these options, as well as unique settings for data directories and so on, and start the two instances by telling safe_mysqld to use the appropriate configuration file, and the appropriate mysqld binary, for each instance.

Before the instance manager in 5.0, there is also mysqld_multi: http://dev.mysql.com/doc/refman/4.1/en/mysqld-multi.html, which might be of help here.

Does that make sense? Did I misunderstand?

--
Eric Braswell
Web Manager     MySQL AB
Cupertino, USA



Yves Goergen wrote:
On 08.04.2006 23:14 (+0100), Eric Braswell wrote:
Yves Goergen wrote:
How can I enter multiple IP addresses there? This isn't documented
online. I need to bind it to one specific external address and
additionally to localhost (127.0.0.1). The other server is only bound to
another external address.
Why do you want to do this?

Currently, I have one IP address on my server, with one MySQL server. In
the near future, I'll have a server with multiple IP addresses and I'm
going to install MySQL 4.0 and 5.0 in parallel. My first design was to
use different ports for both servers, but that's always a little
complicated to configure for the clients. Now I want to use one IP for
one MySQL server. Both are external addresses, which can be assigned
with a DNS name for simple access. But the 4.0 server still has some
system tasks and also for legacy reasons, I'd like to keep the 4.0
server listening on the localhost interface. This also allows me to
assign more strict access rights for these system-related tasks. They
can be limited to the local host instead of any host.





--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to