>> In Linux, the convention to read configuration files are from /etc/ >> <filename>. >> For example, PHP configuration files are read from /etc/php.ini. >> Similarly , for Apache, configuration files are at /etc/httpd.conf >> and MySQL configuration file at /etc/my.cnf >> >> In OpenSolaris, the default configuration files reside under /etc/ >> <component-name>/<version> > > There may be common behaviors for "Linux" and "OpenSolaris" based on > how the distros have integrated things with different paths, but I > don't think you carry that attribute that to every component the Web > Stack project integrates. As I said earlier, MySQL's behavior seems > to be well defined in the documentation. Have a look at this section: > http://dev.mysql.com/doc/refman/5.1/en/option-files.html#id975427 > > I would suggest that as long as it doesn't conflict with any goals > of higher precedence, that it should behave exactly like the docs. > If there is a change in behavior, that should be documented. > Currently, the man pages don't indicate any different behavior.
Agreed :) >> >> So, Apache or PHP or MySQL configuration file resides under >> /etc/apache2/2.2/httpd.conf or /etc/php/5.2/php.ini or /etc/mysql/ >> <5.1>/my.cnf >> >> So, reading from /etc/my.cnf would be an exception and we should >> avoid making exceptions unless there is a very good reason to >> support it. > > I'm not sure I agree with this being an exception based on what I > read in the MySQL documentation. It may well be that OpenSolaris's > distribution of MySQL community edition doesn't install an /etc/ > my.cnf and at the same time does deliver an /etc/mysql/<5.1>/my.cnf, > but the docs seem to make it clear that /etc/my.cnf is a global > options file. It's a bit more complicated than that - as of 5.1.15 /etc/mysql/my.cnf is taken as the config file, and then we look for /etc/my.cnf if we can't open that file. The docs don't actually explicitly state that, so I'll look into and update them if necessary. For the OpenSolaris drops, we put the files into /etc/mysql/VERSION and link my.cnf into /etc/mysql/my.cnf. I think for the SMF we set the version specific file directly, but I'd have to check to be sure. > That means the real problem is the potential conflict from the RHAT > default package [which isn't really an opensolaris.org project, so > isn't really for discussion here... but I lack another forum :) ]. > I don't know what it's contents are and how 'dangerous' they are, > but perhaps the best policy would be to warn of the /etc/my.cnf at > install time of Web Stack on a system that seems to have one defined > by another package. If it helps, default behavior for a MySQL binary or source distribution is not to overwrite a file if it already exists. > By the way, when looking into this I found the mysqld man page says: > > For more information please refer to the MySQL reference > manual, which may already be installed locally and which is > also available online at http://www.mysql.com/doc/en/ > > The problem is that URL isn't valid and www.mysql.com treats it as a > search for "en". This should probably be fixed. It looks like it > should be http://dev.mysql.com/doc/en/. > It also says "Source for mysql is available on http:// > opensolaris.org", which should be more accurate and state that the > source behind this particular distribution you've installed is on > opensolaris.org but the source is available from mysql.com. These last two items are interesting. Man pages with standard MySQL distributions are built directly from the documentation, and don't contain these reference, so I'm guessing these are being built separately and need to be fixed. If I can, I'll see about getting this into the documentation, but I'll need to be sure it goes in in a way that doesn't confuse everybody using the 'standard' man pages and the obviously OpenSolaris specific material. I have a fix for that already ;) MC -- Martin 'MC' Brown, mc at mcslp.com and mc.brown at sun.com Technical Writer, Database Group, Sun Microsystems Everything MCslp: http://planet.mcslp.com