Andrew wrote:

> Hi Everyone,
> 
> I have been searching around for a while, but have had no luck as yet
> for this question.
> 
> I am running debian with mysql 4.x on a x86 box. (2.6 series kernel).
> 
> Anyhow, up until now, I have had a single bind-address option passed,
> however I need to add another address (so it binds to two, but not all
> available addresses) - how can I do this in the my.cnf file?
> 
> 
> 
> Thanks,
> 
> ANdrew.

Hi Andrew,

judging by a quick look at the source of 5.0.18, I would say, that this is
not possible. You can either bind to one or all addresses.

Cheers
Frank

see sql/mysqld.cc:

 case (int) OPT_BIND_ADDRESS:
    if ((my_bind_addr= (ulong) inet_addr(argument)) == INADDR_NONE)
    {
      struct hostent *ent;
      if (argument[0])
        ent=gethostbyname(argument);
      else
      {
        char myhostname[255];
        if (gethostname(myhostname,sizeof(myhostname)) < 0)
        {
          sql_perror("Can't start server: cannot get my own hostname!");
          exit(1);
        }
        ent=gethostbyname(myhostname);
      }
      if (!ent)
      {
        sql_perror("Can't start server: cannot resolve hostname!");
        exit(1);
      }
      my_bind_addr = (ulong) ((in_addr*)ent->h_addr_list[0])->s_addr;
    }
    break;



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

Reply via email to