> Hi, > > > Thank you very much! I'm willing to help test if you can provide me a diff > > of your changes. > > Well, that was easy. I checked the code, and it turns out that the > functionality is already there. I just tested it on my laptop (running > 5.0.13) and it does indeed work. > > I did: > > * echo "10.0.0.1 foo" >> /etc/hosts > * ifconfig lo0 alias 10.0.0.1 > * add to /etc/my.cnf: > [mysqld] > bind-address=foo > * restart mysqld > * mysql -h 10.0.0.1 <-- confirm connection or error from mysqld > * mysql -h 127.0.0.1 <-- confirm failure to connect at all > > I didn't know that this worked. Learn something new every day. > > Are you having a problem with it? Does it not work for you?
Sort of. If I run the command manually, it does. But my script uses su to run the server as an unprivileged user. What happens if you: su -m mysql -c 'sh -c "/usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/www.example.com.pid --bind-address=localhost > /dev/null &"' I'm also hopeful to get multi-IP support, so that I can have the server listen on two NICs or what-have-you, such as: [mysqld] bind_address=foo bar localhost I haven't tried that yet, so perhaps it is already functional as well, I'll try to get to testing that soon. And with other DBs, I can set 'sql.example.com' to resolve to N IPs (N=4 in this example): 10.0.0.10 10.0.1.10 10.0.2.10 10.0.3.10 Then I can have N separate hosts share the same start-up script, because the SQL server binds only to those IPs which are local. Since each of the N servers has only one of those IPs locally, each server automatically binds to the correct IP. And if the IPs ever change, I just update DNS, and there's no need to do any maintenance on the start-up scripts. These IPs would not necessarily be in the same subnet and in fact, are CNAMEs, such as sql.example.com defined as: sql.example.com. IN CNAME dallas-sql.example.com sql.example.com. IN CNAME cleveland-sql.example.com sql.example.com. IN CNAME portland-sql.example.com sql.example.com. IN CNAME sydney-sql.example.com I am grateful to be making progress. Thank you for your assistance. Jim -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]