In your global /etc/my.cnf fle, you should be able to split 
that into sections for each client program that you want to 
set specific options for.

Eg.

# /etc/my.cnf

# MySQL client program configuration file

# last updated 2006-03-05

# mysqld server configuration file lives in 
# /usr/local/mysql-<version>/my.cnf

#-------------------------------------------------------------------
# mysql client program configuration options
#-------------------------------------------------------------------

[mysql]
no-auto-rehash

# needed for security - to stops multiple deletes/updates
# without a where clause
safe-updates 

#--------------------------------------------------------------------

# The following options will be passed to all MySQL clients

[client]
socket = /var/lib/mysql/mysql.sock
port = 7000

#--------------------------------------------------------------------

[myisamchk]
set-variable = key_buffer=20M
set-variable = sort_buffer=20M
set-variable = read_buffer=2M
set-variable = write_buffer=2M

#--------------------------------------------------------------------

[mysqldump]
quick
set-variable = max_allowed_packet=16M

#--------------------------------------------------------------------

# available programs/scripts are: (from 4.0.21 version)

#my_print_defaults                   mysqladmin
#myisamchk                           mysqlbinlog
#myisamlog                           mysqlbug - n/a
#myisampack                          mysqlcheck
#mysql                               mysqld
#mysql_convert_table_format - .pl    mysqld_multi
#mysql_find_rows                     mysqldump
#mysql_fix_privilege_tables  n/a     mysqlhotcopy - .pl
#mysql_install_db                    mysqlimport
#mysql_setpermission - .pl           mysqlshow
#mysql_zap                           mysqltest
#mysqlaccess - .pl                   safe_mysqld

#--------------------------------------------------------------------

# end of mysql client program configurations
# /etc/my.cnf


Take a look at the man pages for the client programs, as 
well as mysqld_safe and mysqld, in /opt/csw/mysql5/man/man1/

Most of the options for client programs are listed there.

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

AFAIK it should be in basedir, and not normally in datadir.
The log files are OK to have in datadir - that's the default 
place SuSE Linux puts them.


HTH

Keith

In theory, theory and practice are the same;
In practice they are not. 

On Mon, 13 Mar 2006, Alex Moore wrote:

> To: mysql@lists.mysql.com
> From: Alex Moore <[EMAIL PROTECTED]>
> Subject: Re: mysql5 options file location
> 
> On Mon, 13 Mar 2006 16:52:03 +0000 (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]

Reply via email to