Re: MySQL variables

2009-12-09 Thread Jesper Wisborg Krogh

On 09/12/2009, at 6:56 PM, machiel.richards wrote:


Good day guys (and girls if any)



I am constantly in a position where variables on a
production mysql database needs to be changed.



The database runs a 24/7 system and thus to reboot  
is not

preffered and should be the absolute last resort.



How can I set variables to be effective  
immediately?   ( I

am still a junior in mysql dba and still learning)


If you take a look at the manual in the section about server options  
and variables (http://dev.mysql.com/doc/refman/5.0/en/mysqld-option- 
tables.html in MySQL 5.0 or http://dev.mysql.com/doc/refman/5.1/en/ 
mysqld-option-tables.html in MySQL 5.1), then you can see which  
settings can be changed dynamically. To change a variable dynamically  
you need to have super privilege, and then set the variable as e.g.


SET GLOBAL system_var_name = ...



If I set these will it still be effective should the
database be restarted somewhere in the future?


The change above will not persist when the database is restarted. In  
order to ensure that, you will have to update the configuration file  
as well.


- Jesper





Thanks in advance for your help.



Regards








--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: mysql variables

2008-04-30 Thread Sebastian Mendel

Krishna Chandra Prajapati schrieb:

Hi Dan,

I am worried about Key_blocks_unused. when Key_blocks_unused reach to 0.
There will be no free blocks then how insert query will work.


it is like any other cache system, if the cache is not usable (full, not 
accessible or whatever) the cache will be omitted, and writes/reads go 
directly to the disk and not the RAM (cache)


you do not need to worry about loosing data caused by a full cache

--
Sebastian Mendel

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



Re: mysql variables

2008-04-30 Thread Dan Nelson
In the last episode (Apr 30), Krishna Chandra Prajapati said:
 I am worried about Key_blocks_unused. when Key_blocks_unused reach to
 0. There will be no free blocks then how insert query will work.

The oldest block will be written to disk if it is dirty, and
discarded.

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Re: mysql variables

2008-04-29 Thread Dan Nelson
In the last episode (Apr 30), Krishna Chandra Prajapati said:
 Key_blocks_unused  952405
 Key_blocks_used395539
 
 Key_blocks_used  is increasing day by day and Key_blocks_unused is
 decreasing day by day. Ater a month Key_blocks_unused will reach to
 0. Does it mean that i need to increase the key_buffer_size. Already
 key_buffer_size=1G.
 
 While going through forums and lists , i found that when
 key_blocks_unused is less. then select query will become slow. So
 whats the right solution.

In a perfect world, you would set key_buffer_size to the total size of
all your .MYI files.  Depending on the size of your tables, that may
simply not be possible.  Luckily, it's usually not necessary, either. 
What is more important is the hit rate.  Run SHOW STATUS LIKE 'key%',
and compare Key_read_requests (how many times mysql asked for a key)
against Key_reads (how many times mysql actually had to go to disk to
fetch a key).  1-(Key_reads/Key_read_requests) is your read hit rate. 
If it's 0.99 or greater, that means that 99% of your key reads are
already coming from the key buffer, and adding more key buffers is
unlikely to give you a measurable performance increase.

Don't worry too much about your write hit rate (
1-(Key_writes/Key_write_requests) ); it's always going to be lower
because mysql tries to keep the on-disk copy of the index up to date.

-- 
Dan Nelson
[EMAIL PROTECTED]

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



Re: mysql variables

2008-04-29 Thread Krishna Chandra Prajapati
Hi Dan,

I am worried about Key_blocks_unused. when Key_blocks_unused reach to 0.
There will be no free blocks then how insert query will work.

Thanks
Krishna Chandra Prajapati

On Wed, Apr 30, 2008 at 10:42 AM, Dan Nelson [EMAIL PROTECTED]
wrote:

 In the last episode (Apr 30), Krishna Chandra Prajapati said:
  Key_blocks_unused  952405
  Key_blocks_used395539
 
  Key_blocks_used  is increasing day by day and Key_blocks_unused is
  decreasing day by day. Ater a month Key_blocks_unused will reach to
  0. Does it mean that i need to increase the key_buffer_size. Already
  key_buffer_size=1G.
 
  While going through forums and lists , i found that when
  key_blocks_unused is less. then select query will become slow. So
  whats the right solution.

 In a perfect world, you would set key_buffer_size to the total size of
 all your .MYI files.  Depending on the size of your tables, that may
 simply not be possible.  Luckily, it's usually not necessary, either.
 What is more important is the hit rate.  Run SHOW STATUS LIKE 'key%',
 and compare Key_read_requests (how many times mysql asked for a key)
 against Key_reads (how many times mysql actually had to go to disk to
 fetch a key).  1-(Key_reads/Key_read_requests) is your read hit rate.
 If it's 0.99 or greater, that means that 99% of your key reads are
 already coming from the key buffer, and adding more key buffers is
 unlikely to give you a measurable performance increase.

 Don't worry too much about your write hit rate (
 1-(Key_writes/Key_write_requests) ); it's always going to be lower
 because mysql tries to keep the on-disk copy of the index up to date.

 --
Dan Nelson
[EMAIL PROTECTED]

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




-- 
Krishna Chandra Prajapati


Re: MySQL Variables

2001-07-15 Thread Michael Collins

At 1:47 PM -0500 7/14/01, Paul DuBois wrote:
Any solution I've tried using the LassoMySQL/var/my.cnf or 
~/.my.cnf files affect both the special installation as well as 
the standard MySQL installation. I find I will always get the 
standard port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...

The clients won't use the option file in the data directory.  They will
only use the shared option file /etc/my.cnf, and the .my.cnf in your home
directory.  You might be better off creating aliases that specify the
options on the command line.


Thank you Paul with your help so far.

As a reminder my situation is having a Mac OS X server with two MySQL 
server binaries installed (with a complete set of MySQL installed 
files in the two separate locations). One uses the standard 
/usr/local/bin location for MySQL the other installs into the 
Application directory. I am trying to find an easier way to not 
have to specify the socket option each time I use one of the MySQL 
client programs for databases hosted by Lasso MySQL. As an example to 
run these commands they need to use the form:

root% ./bin/mysql --socket=/tmp/SpecialMySQL.sock MCExample  
/Import_MCExample.mysql

root% ./bin/mysqlshow --socket=/tmp/SpecialMySQL.sock

root% ./bin/mysqladmin --socket=/tmp/SpecialMySQL.sock create newDatabaseName

In short, it becomes burdensome to type 
--socket=/tmp/LassoMySQL.sock each time.

So what I am left with is that I will need to create a startup file 
to map the command you type in to the actual command with the -socket 
specified?

Example, create a .cshrc (Mac OS X uses the tcsh shell) and locate it 
in my user directory or in /etc (I am not sure about this?). Set up 
the alias lines as follows:

alias mysqldump /Applications/special/specialMySQL/bin/mysqldump 
--socket=/tmp/SpecialMySQL.sock

alias mysqladmin /Applications/special/specialMySQL/bin/mysqladmin 
--socket=/tmp/SpecialMySQL.sock

alias mysql /Applications/special/specialMySQL/bin/mysql 
--socket=/tmp/SpecialMySQL.sock

I would actually need to use a somewhat different name for the alias 
as this will interfere with use of the command for the standard 
install.

The question though is will parameters be passed in? Will it then 
work, for example, to import a file using:

root% mysql MCExample  /Import_MCExample.mysql

I cannot test it since so far the alias file idea does not work, I 
put the .cshrc file into my home directory, logged out and started a 
new telnet session.

-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-15 Thread Michael Collins

At 11:09 AM -0700 7/15/01, Michael Collins wrote:
At 1:47 PM -0500 7/14/01, Paul DuBois wrote:
Any solution I've tried using the LassoMySQL/var/my.cnf or 
~/.my.cnf files affect both the special installation as well as 
the standard MySQL installation. I find I will always get the 
standard port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...

The clients won't use the option file in the data directory.  They will
only use the shared option file /etc/my.cnf, and the .my.cnf in your home
directory.  You might be better off creating aliases that specify the
options on the command line.


Thank you Paul with your help so far.
So what I am left with is that I will need to create a startup file 
to map the command you type in to the actual command with the 
-socket specified?

Hey, maybe I answered part of my own question (thanks to the book 
Essential System Administration from O'Reilly). There is a file on 
Mac OS X at:
/usr/share/init/tcsh/rc that starts with the following:

##
# TCSH Expanded C-Shell INITIALIZATION FILE
#
# Wilfredo Sanchez Jr. | [EMAIL PROTECTED]
# July 09, 1992
#
# MIT Project Athena
#
# ORIGINAL SOURCES: /usr/athena/lib/init/cshrc (ATHENA REL 7.3P)
##

Adding the following and restarting the telnet session seems to work:

alias specialmysqldump 
/Applications/Special/SpecialMySQL/bin/mysqldump 
--socket=/tmp/SpecialMySQL.sock
alias specialmysqladmin 
/Applications/Special/SpecialMySQL/bin/mysqladmin 
--socket=/tmp/SpecialMySQL.sock
alias specialmysql /Applications/Special/SpecialMySQL/bin/mysql 
--socket=/tmp/SpecialMySQL.sock

I now get the list of databases for the Special installation when 
using specialmysql as a command.

And if I use with parameters or redirect to a file it also works:

specialmysqldump --opt special_site_1  /temp.mysql

And this actually added a database called special:

root% specialmysqladmin create special

Hurray!

-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-15 Thread Paul DuBois

At 12:39 PM -0700 7/15/01, Michael Collins wrote:
At 11:09 AM -0700 7/15/01, Michael Collins wrote:
At 1:47 PM -0500 7/14/01, Paul DuBois wrote:
Any solution I've tried using the LassoMySQL/var/my.cnf or 
~/.my.cnf files affect both the special installation as well as 
the standard MySQL installation. I find I will always get the 
standard port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...

The clients won't use the option file in the data directory.  They will
only use the shared option file /etc/my.cnf, and the .my.cnf in your home
directory.  You might be better off creating aliases that specify the
options on the command line.


Thank you Paul with your help so far.
So what I am left with is that I will need to create a startup file 
to map the command you type in to the actual command with the 
-socket specified?

Hey, maybe I answered part of my own question (thanks to the book 
Essential System Administration from O'Reilly). There is a file on 
Mac OS X at:
/usr/share/init/tcsh/rc that starts with the following:

##
# TCSH Expanded C-Shell INITIALIZATION FILE
#
# Wilfredo Sanchez Jr. | [EMAIL PROTECTED]
# July 09, 1992
#
# MIT Project Athena
#
# ORIGINAL SOURCES: /usr/athena/lib/init/cshrc (ATHENA REL 7.3P)
##

Adding the following and restarting the telnet session seems to work:

alias specialmysqldump 
/Applications/Special/SpecialMySQL/bin/mysqldump 
--socket=/tmp/SpecialMySQL.sock
alias specialmysqladmin 
/Applications/Special/SpecialMySQL/bin/mysqladmin 
--socket=/tmp/SpecialMySQL.sock
alias specialmysql /Applications/Special/SpecialMySQL/bin/mysql 
--socket=/tmp/SpecialMySQL.sock

I now get the list of databases for the Special installation when 
using specialmysql as a command.

And if I use with parameters or redirect to a file it also works:

specialmysqldump --opt special_site_1  /temp.mysql

And this actually added a database called special:

root% specialmysqladmin create special

Hurray!

Sounds like that should do it.  (O'Reilly also has a book Using csh  tcsh
specifically on the shell that you're using that has a chapter on startup
files and another on aliases.  It's written by, er ... never mind.)


--
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail mysql-unsubscribe-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-15 Thread Michael Collins

At 6:12 PM -0500 7/15/01, Paul DuBois wrote:
Sounds like that should do it.  (O'Reilly also has a book Using csh  tcsh

Actually, after having problems finding this file I started looking 
for a reference to buy and came across Using csh  tcsh and did 
recognize the author. This book has a 1995 release date on it which 
in internet time makes it an antique, but in the case of Unix 
probably not a whole lot has changed I imagine. Nevertheless, it 
would be a dream if you could write the version of Using tcsh 
specifically for Mac OS X.
-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com
database,sql,query,table

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Paul DuBois

At 11:32 AM -0500 7/14/01, MikemickaloBlezien wrote:
when you do a mysqladmin variables, where exactly are these variables stored,
and can they be changed.

They can be changed by placing set-variable= var_name=var_value lines
in the [mysqld] group of the /etc/my.cnf option file (or any other option
file that the server reads at startup time).

  Also if a /etc/my.cnf is going to be used, once it's
been created does the MySQL server need to be shutdown and restarted to
recognize the new my.cnf file??

Yes.


Again, Thx for the help :)

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Michael Collins

At 11:46 AM -0500 7/14/01, Paul DuBois wrote:
At 11:32 AM -0500 7/14/01, MikemickaloBlezien wrote:
when you do a mysqladmin variables, where exactly are these variables stored,
and can they be changed.

They can be changed by placing set-variable= var_name=var_value lines
in the [mysqld] group of the /etc/my.cnf option file (or any other option
file that the server reads at startup time).

I too have been trying to get a my.cnf file working properly with 
little success. The twist in my tale is that I have two copies of 
MySQL installed, one of which uses the standard install location 
(/usr/local/) and port, and the other a custom location, port, and 
socket. I would like for the second copy to always use the special 
port or socket whenever I utilize any of the mysql client programs 
(which I invoke from the special location of those files).

I have read the manual about option files and looked for the answer 
in the MySQL DuBois book. I have used what I believe to be the 
correct parameters based on a file I found at 
/usr/local/share/mysql/my-small.cnf). This is a source install so I 
understand from the manual that the my.cnf file goes in the var 
directory.

I have also tried a simple version of this:

[client]
port=14551
socket=/tmp/LassoMySQL.sock

Any solution I've tried using the LassoMySQL/var/my.cnf or ~/.my.cnf 
files affect both the special installation as well as the standard 
MySQL installation. I find I will always get the standard port.

Help?

-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Paul DuBois

At 10:11 AM -0700 7/14/01, Michael Collins wrote:
At 11:46 AM -0500 7/14/01, Paul DuBois wrote:
At 11:32 AM -0500 7/14/01, MikemickaloBlezien wrote:
when you do a mysqladmin variables, where exactly are these 
variables stored,
and can they be changed.

They can be changed by placing set-variable= var_name=var_value lines
in the [mysqld] group of the /etc/my.cnf option file (or any other option
file that the server reads at startup time).

I too have been trying to get a my.cnf file working properly with 
little success. The twist in my tale is that I have two copies of 
MySQL installed, one of which uses the standard install location 
(/usr/local/) and port, and the other a custom location, port, and 
socket. I would like for the second copy to always use the special 
port or socket whenever I utilize any of the mysql client programs 
(which I invoke from the special location of those files).

If each server is compiled to use a different data directory, then you should
be able to put a my.cnf file in the data directory to affect the respective
server using the [mysqld] group in each file.


I have read the manual about option files and looked for the answer 
in the MySQL DuBois book. I have used what I believe to be the 
correct parameters based on a file I found at 
/usr/local/share/mysql/my-small.cnf). This is a source install so I 
understand from the manual that the my.cnf file goes in the var 
directory.

I have also tried a simple version of this:

[client]
port=14551
socket=/tmp/LassoMySQL.sock

Any solution I've tried using the LassoMySQL/var/my.cnf or ~/.my.cnf 
files affect both the special installation as well as the standard 
MySQL installation. I find I will always get the standard port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...


Help?

--
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread MikemickaloBlezien

On Sat, 14 Jul 2001 11:46:15 -0500, Paul DuBois [EMAIL PROTECTED]   wrote:


  Also if a /etc/my.cnf is going to be used, once it's
been created does the MySQL server need to be shutdown and restarted to
recognize the new my.cnf file??

Yes.

is this the default location it looks for a 'my.cnf' file or can this be defined
some where?


Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Michael Collins

At 12:25 PM -0500 7/14/01, Paul DuBois wrote:
Any solution I've tried using the LassoMySQL/var/my.cnf or 
~/.my.cnf files affect both the special installation as well as the 
standard MySQL installation. I find I will always get the standard 
port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...

But if I use /Path/specialMySQL/var/my.cnf and my option file contains:

[client]
port=14551
socket=/tmp/LassoMySQL.sock

Then, invoking the client from within /Path/specialMySQL/bin/mysql 
would use the different port and socket?

And, using /usr/local/mysql would then use the default datadirectory and port?

BTW, this is on Mac OS X, I wouldn't think it would matter but I 
thought to mention it.
-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Paul DuBois

At 12:51 PM -0500 7/14/01, MikemickaloBlezien wrote:
  On Sat, 14 Jul 2001 11:46:15 -0500, Paul DuBois [EMAIL PROTECTED]   wrote:


   Also if a /etc/my.cnf is going to be used, once it's
been created does the MySQL server need to be shutdown and restarted to
recognize the new my.cnf file??

Yes.

is this the default location it looks for a 'my.cnf' file or can 
this be defined
some where?

See:

http://www.mysql.com/doc/O/p/Option_files.html



Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Michael Collins

At 12:51 PM -0500 7/14/01, MikemickaloBlezien wrote:
is this the default location it looks for a 'my.cnf' file or can 
this be defined
some where?

Straight from the manual:

4.16.5 Option Files

MySQL Version 3.22 can read default startup options for the server 
and for clients from option files. MySQL reads default options from 
the following files on Unix:

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

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 eect on where the server 
looks for option files, because it looks for them before it processes 
any command-line arguments.)

MySQL tries to read option files in the order listed above. If 
multiple option files exist, an option specified in a file read later 
takes precedence over the same option specified in a file read 
earlier. Options specified on the command line take precedence over 
options specified in any option file. Some options can be specified 
using environment variables. Options specified on the command line or 
in option files take precedence over environment variable values. See 
Appendix A [Environment variables], page 540.
-- 
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: MySQL Variables

2001-07-14 Thread Paul DuBois

At 12:25 PM -0500 7/14/01, Paul DuBois wrote:
Any solution I've tried using the LassoMySQL/var/my.cnf or 
~/.my.cnf files affect both the special installation as well as 
the standard MySQL installation. I find I will always get the 
standard port.

Settings in the [client] group of your ~/.my.cnf file would affect any
client that you run.  I would expect that all clients would therefore
connect to the same server...

But if I use /Path/specialMySQL/var/my.cnf and my option file contains:

[client]
port=14551
socket=/tmp/LassoMySQL.sock

Then, invoking the client from within /Path/specialMySQL/bin/mysql 
would use the different port and socket?

And, using /usr/local/mysql would then use the default datadirectory and port?

The clients won't use the option file in the data directory.  They will
only use the shared option file /etc/my.cnf, and the .my.cnf in your home
directory.  You might be better off creating aliases that specify the
options on the command line.


BTW, this is on Mac OS X, I wouldn't think it would matter but I 
thought to mention it.

Shouldn't make any difference.  I've noticed no special problems with MySQL
on Mac OS X other than that mysqladmin shutdown doesn't work.

--
Michael
__
||| Michael Collins   |||
||| Kuwago Web Services   |||  mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA  |||  http://www.lassodev.com


-- 
Paul DuBois, [EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php