mysql5 options file location

2006-03-13 Thread Alex Moore
I am building mysql5 latest from source on Solaris.

The location of the options file is very confusing and does not work
according to the online documentation.  For example, I have --basedir
of /opt/csw/mysql5 and --datadir of /opt/csw/mysql5/var.  If I put
my.cnf in datadir or in basedir, the file is not used.  I am using
mysqld_safe to start mysqld.  my.cnf options will only work if I put
the file in /etc/

'./libexec/mysqld --verbose --help' returns:
Default options are read from the following files in the given order:
/etc/my.cnf ~/.my.cnf

This is very different from my mysql4 builds from source, which include
the documented server-specific file listed after /etc/my.cnf

How can I get mysql5 to use a server-specfic options file?  Am I
missing a configure option or defines for mysql5?

Thanks,

Alex


-- 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql5 options file location

2006-03-13 Thread Alex Moore
On Mon, 13 Mar 2006 16:52:03 + (GMT)
[EMAIL PROTECTED] wrote:

 
 Hi Alex. It seems that mysqld and all the client 
 programs insist on reading /etc/my.cnf first.
 
 To overide this behaviour for a particular instance of 
 mysqld you need to pass the --defaults-file option as the 
 FIRST parameter to mysqld_safe or mysqld if you are not using
 mysqld_safe.

Yes, I understand everything that you said Keith and have used the
options file logic to my advantage as well.  Thanks for the full
description.

What is not working for me is that the server-specific file does not
appear to be built into all of the objects like it was in 4.1.

For example, my.cnf is in basedir.  my.cnf has a [mysqld] group that
defines many options like various logging selections and tuning.  I do
not want those options in a global file since I am not supposed to
write to /etc/.  I am using a directory structure similar
to /usr/local/mysql5, but it is actually /opt/csw/mysql5.

The server-specific options are read on mysqld_safe at startup, as
evidenced by `mysqladmin variables`.

Without a /etc/my.cnf file, 'my_print_defaults mysqld' prints nothing.
With a /etc/my.cnf file, 'my_print_defaults mysqld' prints only the
options in /etc/my.cnf.  This is very different from 4.1 and causing me
a lot of headaches and is probably my biggest issue with 5.0.

I could go on about the utilities that do not work without a global
options file.

Another clue about this change from 4.1 is the `mysqld --verbose
--help` output not listing a server-specific options file on 5.0

I just wondered if I did something wrong or if I can just not use some
utilities in 5.0

The situation with 5.0 and the options file is really much bigger than
what I have described.  I have big problems with the 5.0 location of
the server-specific options file moving from datadir to basedir. But
that is another discussion.

Thanks,

Alex


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysql5 options file location

2006-03-13 Thread Alex Moore
On Mon, 13 Mar 2006 23:05:30 + (GMT)
[EMAIL PROTECTED] wrote:

 Exactly what are the problems you are having with the server 
 specific my.cnf file?

Sorry, I thought that I had described the problem.  A quick example was
'my_print_defaults mysqld' returning only the options defined in the
global file.  None of the options from the server-specific my.cnf are
returned.  This is not the way 4.1, and probably earlier, works.

Thanks,

Alex


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]