List:Internals« Previous MessageNext Message »
From:Russell E Glaue Date:December 1 2000 1:09am
Subject:LOCALSTATEDIR or DATADIR (Documentation Error ?)
View as plain text  
I noticed something, maybe I should be beat over the head for not
realizing it after all these years.  In defense, I always used the default
in the past until now that I am compiling multiple mysqld binaries for
multiple Master replication purposes on a single slave host.
But I think this is a documentation problem...

If I want to change the location the MySQL Database files are stored, I
change that in compile time with the '--localstatedir=DIR' flag  and
not the '--datadir=DIR' flag. right?

The documentation refers to DATADIR as '--datadir' although using
'--localstatedir' in its './configure' examples... and without reading the
'./configure --help' thoroughly (I did read it) I compiled with the
'--datadir' thinking this indicated where the Database Files are stored.

`DATADIR' is the *MySQL* data directory (typically
`/usr/local/mysql/data' for a binary installation or `/usr/local/var'
for a source installation).  Note that this is the directory that was
specified at configuration time, not the one specified with `--datadir'
when `mysqld' starts up!  (`--datadir' has no effect on where the
server looks for option files, because it looks for them before it
processes any command-line arguments.)
`-h, --datadir=path'
     Path to the database root.
--- why is  '-h'  in the above documentation line?
	 .. ('-h' errors in './configure')

the ./configure examples (which I did not look at at first) use
'--localstatedir=DIR' to do what the above first paragraph states.

And now that I think back after all these years, this is all now seems
confusing that individuals (like mysqlf) on the lists and the web sites
refer to the MySQL Database directory as DATADIR.
Should the proper way to refer to the compiled MySQL database directory
really be LOCALSTATEDIR and not DATADIR?

EXAMPLE:  (line 4411 of INSTALL-SOURCE file)
  *Filename*             *Purpose*
  `/etc/my.cnf'          Global options
  `DATADIR/my.cnf'       Server-specific options
  `defaults-extra-file'  The file specified with -defaults-extra-file=#
  `~/.my.cnf'            User-specific options
** Should Really Read **
  *Filename*             *Purpose*
  `/etc/my.cnf'          Global options
  `LOCALSTATEDIR/my.cnf' Server-specific options
  `defaults-extra-file'  The file specified with -defaults-extra-file=#
  `~/.my.cnf'            User-specific options


 Russell E Glaue, Technologies Engineer & Integrator  russ@stripped
 Center for the Application of Information Technologies
 WIU, 101 Horrabin Hall, 1 University Circle, Macomb, IL 61455

mysql.db constraintsRyan W. Maple27 Nov
  • Re: mysql.db constraintsBeotel27 Nov
  • Re: mysql.db constraintsRussell E Glaue27 Nov
    • LOCALSTATEDIR or DATADIR (Documentation Error ?)Russell E Glaue1 Dec
  • Re: mysql.db constraintsSasha Pachev27 Nov