Subject: mysql grant table and hostname
To: None <current-users@netbsd.org>
From: Tom T. Thai <tomthai@future.net>
List: current-users
Date: 11/14/1998 23:49:46
should 'hostname' return just the hostname or the FQDN?  The reason I ask
is because when mysql's mysql_install_db is executed (pkg collection), it
sets up a hostname entry in the grant table.  But I'm not sure if it's
just the hostname or FQDN.  I think it's just the hostname for this
reason:

# mysql -u root mysql
ERROR 1045: Access denied for user: 'root@localhost' (Using password: NO)
# mysql -u root -h predict mysql
ERROR 1130: Host 'predict.future.net' is not allowed to connect to this
MySQL server

That was after I setup the password for user root for the mysql grant
table.  A note to others who haven't the time to read thru the mysql
docs...

     localhost is a synonym for your local hostname, and is also the
     default host that clients try to connect to
     if you specify no host explicitly. However, connections to localhost 
     do not work if you are running on a
     system that uses MIT-pthreads (localhost connections are made using
     Unix sockets, which are not
     supported by MIT-pthreads). To avoid this problem on such systems,
     you should use the --host option to
     name the server host explicitly. This will make a TCP/IP connection
     to the mysqld server. In this case, you
     must have your real hostname in user table entries on the server
     host. (This is true even if you are running
     a client program on the same host as the server.) 

..............          ....................................
Thomas T. Thai          Infomedia Interactive Communications
tom@iic.net             TEL 612.376.9090 * FAX 612.376.9087