Bug #8649 | ./configure --sysconfdir=/someplace does not find my.cnf in /someplace | ||
---|---|---|---|
Submitted: | 21 Feb 2005 13:10 | Modified: | 14 Jun 2006 2:21 |
Reporter: | Peter O'Gorman | Email Updates: | |
Status: | Won't fix | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 4.1.10 | OS: | darwin |
Assigned to: | CPU Architecture: | Any |
[21 Feb 2005 13:10]
Peter O'Gorman
[21 Feb 2005 14:43]
Sergei Golubchik
The problem is that mysqld read /etc/my.cnf for ages and we have to stick to this for compatiblity reasons. On the other hand, respecting --sysconfdir is also important. Unfortunately, I don't know an easy fix. :( You are very welcome to suggest a patch that would have the following property: after ./configure --prefix=/foo mysqld will read /etc/my.cnf and not /foo/etc/my.cnf In other words, mysqld should only respect explicit --sysconfdir
[21 Feb 2005 14:47]
Peter O'Gorman
Would it be a major issue if it looked in both $(prefix)/etc and /etc, or would you require that --sysconfdir be explicitly specifed in that case too?
[21 Feb 2005 22:40]
Hartmut Holzgraefe
This has already been discussed in Bug #4993 ... Do you know that the server also looks for $datadir/my.cnf ? When having multiple MySQL installations on a single server it is common to use the datadir approach only whithout creating a /etc/mysql.cnf at all. The datadir itself can be set using the configure options --prefix or --datadir so this might already help to solve your problem?
[22 Feb 2005 3:07]
Peter O'Gorman
Yes, I know that DATADIR is an alternative location for my.cnf, I'd still like sysconfdir to work though, I think adding something like this to configure.ac and then modifying default.c and it's makefile shoudl do the trick: case "$@" in *" -sysconfdir="* | *" --sysconfdir="* | *" --sysconfdi="* \ | *" --sysconfd="* | *" --sysconf="* \ | *" --syscon="* | *" --sysco="* | *" --sysc="* \ | *" --sys="* | *" --sy="*) ;; *) sysconfdir=/etc ;; esac Thoughts?
[13 Jun 2006 23:50]
Kevin Benton
The suggested solution assumes that the user installing MySQL has root level access. How do you suggest dealing with the non-root user that needs their own MySQL installation?
[14 Jun 2006 2:21]
Peter O'Gorman
As far as I know mysql does not actually install any files into ${sysconfdir}, it just looks for them there, so what is the problem? I don't care about this anymore though. You'll notice that it got marked "Won't fix" and that it is more than a year old. I'll just live with a local patch.