>Description:
        Mysqld has some trouble with hostname resolution.
        My server has several IP and I want to bind on one of them :
          --bind-addresse=servername
        But it doesn't work. Mysqld always bind on the IP which
        is given by `hostname -i`.

>Fix:
        By quickly examining the code, it seems that there is an
intervertion
        between in a 'if...else...' clause :

--- mysql-3.23.53/sql/mysqld.cc Thu Oct 10 12:17:28 2002
+++ mysql-3.23.53-patch/sql/mysqld.cc   Tue Nov 19 12:19:30 2002
@@ -3831,9 +3831,8 @@
       else
       {
        struct hostent *ent;
+
        if (!optarg || !optarg[0])
-         ent=gethostbyname(optarg);
-       else
        {
          char myhostname[255];
          if (gethostname(myhostname,sizeof(myhostname)) < 0)
@@ -3843,6 +3842,9 @@
          }
          ent=gethostbyname(myhostname);
        }
+       else
+         ent=gethostbyname(optarg);
+
        if (!ent)
        {
          sql_perror("Can't start server: cannot resolve hostname!");


>Submitter-Id:  <submitter ID>
>Originator:
>Organization:
 <organization of PR author (multiple lines)>
>MySQL support: none
>Synopsis:      Problem on mysqld with --bind-address
>Severity:      non-critical
>Priority:      <[ low | medium | high ] (one line)>
>Category:      mysql
>Class:         <[ sw-bug | doc-bug | change-request | support ] (one
line)>
>Release:       mysql-3.23.53 (Source distribution)

>Environment:
        <machine, os, target, libraries (multiple lines)>
System: Linux devsi 2.2.20 #1 Sat Apr 20 11:45:28 EST 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
Compilation info: CC='gcc'  CFLAGS='-O3 -mpentiumpro'  CXX='gcc'
CXXFLAGS='-O3 -mpentiumpro -felide-
constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC:
lrwxrwxrwx    1 root     root           13 Oct 10 15:57 /lib/libc.so.6 ->
libc-2.2.5.so
-rwxr-xr-x    1 root     root      1153784 Apr 28  2002 /lib/libc-2.2.5.so
-rw-r--r--    1 root     root      2390922 Apr 28  2002 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 Apr 28  2002 /usr/lib/libc.so
Configure command: ./configure --prefix=/home/mysql --with-gnu-ld --enable-assembler 
--with-mysqld-user=mysql --with-mysqld-ldflags=-all-static 
--with-client-ldflags=-all-static --disable-shared --with-extra-charset=all 
--with-innodb --without-debug 'CFLAGS=-O3 -mpentiumpro' 'CXXFLAGS=-O3 
-mpentiumpro-felide-constructors -fno-exceptions -fno-rtti' CXX=gcc



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to