Bug 79597

Summary: databases/mysql323-server does not find my.cnf if not placed in /var/db/mysql/
Product: Ports & Packages Reporter: Vasil Dimov <vd>
Component: Individual Port(s)Assignee: Alex Dupre <ale>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Vasil Dimov 2005-04-06 10:50:06 UTC
If nonstandard data directory is used for mysql-server-3.23.59.n.20050301
configuration, for example /var/db/mysql3 (instead of /var/db/mysql) the server
behaves as if there is no (or empty) /var/db/mysql3/my.cnf although
mysql_dbdir="/var/db/mysql3" is set in /etc/rc.conf.local

mysqld is started with appropriate --datadir=/var/db/mysql3

Fix: 

1.
mkdir /var/db/mysql
cp /var/db/mysql3/my.cnf /var/db/mysql
(huh! what an ugly deed)

2.
edit /usr/ports/databases/mysql323-server/Makefile and change line
CONFIGURE_ARGS= --localstatedir=/var/db/mysql \
to
CONFIGURE_ARGS= --localstatedir=/var/db/mysql3 \

Probably DB_DIR functionality in Makefile should be brought back to life?

Yes, I have read ports/UPDATING but this is surely a bug/feature (probably in
mysql server itself) that must be fixed/worked-around somehow.
How-To-Repeat: Create and setup /var/db/mysql3 as data directory and put
mysql_dbdir="/var/db/mysql3" in /etc/rc.conf.local

Also put some options in /var/db/mysql3/my.cnf for example skip-networking
(even /dev/urandom > /var/db/mysql3/my.cnf will do the work)
and inspect mysql server behavior - it does not honor my.cnf
because it is looking for it in /var/db/mysql/my.cnf
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-04-06 23:54:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer.
Comment 2 Alex Dupre freebsd_committer freebsd_triage 2005-04-11 10:33:30 UTC
State Changed
From-To: open->closed

A fix has been committed, thanks!