Subject: mysql-server install quirk
To: None <tech-pkg@netbsd.org>
From: Ben Collver <collver1@comcast.net>
List: tech-pkg
Date: 12/16/2003 19:46:52
Hi,

I notice this mailing list is set as MAINTAINER for mysql-server, so I
thought I'd bring up something I ran into.

INSTALL runs mysql_install_db --force, which creates a default access list
with both localhost and the system name.

by default, MESSAGE instructs the user to run:
	chown -R mysql:mysql /var/mysql
	mysqladmin -u root -p password 'new-password'
	mysqladmin -h `hostname` -u root -p password 'new-password'

I run into an error on the last step:
	# mysqladmin -h `hostname` -u root -p password 'new-password'
	Enter password:
	mysqladmin: connect to server at 'fence' failed
	error: 'Host 'fence.takilma.net' is not allowed to connect to this \
		MySQL server'

This is probably a cinch for experienced MySQL users, but I am not one of
those.  I'm thinking the instructions should say something like:
	chown -R mysql:mysql /var/mysql
+	mysql mysql
+	update user set host='hostname.domain.net' where host='hostname';
+	flush privileges;
+	\q
	mysqladmin -u root -p password 'new-password'
	mysqladmin -h `hostname` -u root -p password 'new-password'
	
Section 2 may be better done as a patch to mysql_install_db.sh

Cheers,

Ben
-- 
A hacker does for love what others would not do for money.