Using MySql 3.22.22 on Linux (from the RPMs)
I was re-installing MySQL after a system upgrade, and decided that my
databases should reside in a different location, so that they wouldn't
be lost in the next upgrade. I created /etc/my.cnf, containing
/usr/bin/safe_mysql ignores this setting, and sets its own datadir, by
passing --datadir=$DATADIR to mysqld.
One solution is to change /etc/rc.d/init.d/mysql to pass --datadir to
I chose the simpler solution of deleting the --datadir
option from safe_mysql.
Bottom line - a user should be able to set the database
directory in one place, /etc/my.cnf, and have mysql use his choice.
Joe VanAndel Internet: vanandel@stripped
National Center for http://www.atd.ucar.edu/~vanandel/