List:General Discussion« Previous MessageNext Message »
From:Joe Van Andel Date:May 6 1999 7:15pm
Subject:safe_mysql over-rides /etc/my.cnf datadir
View as plain text  
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
[mysqld]
user=mysql
datadir=/wwwdata1/mysql

/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
safe_mysql.  

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.

Thanks!

-- 
Joe VanAndel  	          Internet: vanandel@stripped
National Center for 	  http://www.atd.ucar.edu/~vanandel/
Atmospheric Research
Thread
safe_mysql over-rides /etc/my.cnf datadirJoe Van Andel6 May
  • Re: JSP newbie needs to run MySQL-JDBC.Igor Fedulov31 Oct