[bug-notifications] [mysql5 0004646]: /var/opt/csw/mysql5/my.cnf ignored

Mantis Bug Tracker noreply at opencsw.org
Sun Jan 2 22:26:54 CET 2011


A NOTE has been added to this issue. 
====================================================================== 
https://www.opencsw.org/mantis/view.php?id=4646 
====================================================================== 
Reported By:                james
Assigned To:                maciej
====================================================================== 
Project:                    mysql5
Issue ID:                   4646
Category:                   other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             2010-12-22 13:49 CET
Last Modified:              2011-01-02 22:26 CET
====================================================================== 
Summary:                    /var/opt/csw/mysql5/my.cnf ignored
Description: 
The start up script:
/var/opt/csw/svc/method/svc-cswmysql5
has provision to use a local configuration:
MYSQL_VAR=/var/opt/csw/mysql5
CONFFILE=$MYSQL_VAR/my.cnf

but it fails:

WARNING: Found two instances of my.cnf -
/opt/csw/mysql5/my.cnf and
/var/opt/csw/mysql5/my.cnf
IGNORING /var/opt/csw/mysql5/my.cnf

If I can't write to /opt this is a problem and if I can then I'm wasting
my time in /var/opt anyway.



====================================================================== 

---------------------------------------------------------------------- 
 (0008654) phil (developer) - 2011-01-02 22:26
 https://www.opencsw.org/mantis/view.php?id=4646#c8654 
---------------------------------------------------------------------- 
James: It should be mentioned that mysql documentation says that checking
the datadir, is standard procedure.
So if datadir is under /var, then it is valid and expected that the conf
file could also be under /var in that directory.
That being said, I think it should *also* check under /etc.
Although in our case, /etc/opt/csw

the script also claims that having it in datadir, is deprecated, however.



To Maciej:

I dont think that making the user set variables is a good idea. I think
the better method is to fix the startup script to follow good orders for
csw layout.
This should work, whether the thing is started via smf, or "by hand".


For _safe script fixes, I think we should just hard-patch the code block
starting with

if test -r "$MY_BASEDIR_VERSION/my.cnf" && test -r "$DATADIR/my.cnf"

to be just

if test -r "/etc/opt/csw/my.cnf" ; then
   MYSQL_HOME=/etc/opt/csw
elif test -r "$DATADIR/my.cnf" ; then
  MYSQL_HOME=$DATADIR
fi

erm.. except you seem to have configured it  with /etc/opt/csw/mysql5, so
okay, substitute that in, above?



More information about the bug-notifications mailing list