Re: Global Variables

2011-11-30 Thread Johan De Meersman
- Original Message -
> From: "Stdranwl" 
> 
> So then no use of setting 3G sort buffer in my.cnf untill system will
> take a rebot?
> I was in the impression that 10M will be used and it will be
> scratched to 3G whenever required as same is set globally?

No, you've got it the wrong way round. When a new client connects, it's session 
variables are initialised from the global values. Thus, if your global value is 
3G, new clients will get a session value of 3G.

If your appplication or the client subsequently decides to set the session 
value to 10M, *then* it will be 10M.

Open a new terminal and make a new connection, then look at the session 
variables. If they're still different from the global value, something is 
setting them upon connect. Check for a .my.cnf file in your homedir, aliases or 
wrapper scripts for the mysql client, etc.

-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

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



Re: Global Variables

2011-11-30 Thread Stdranwl
So then no use of setting 3G sort buffer in my.cnf untill system will take
a rebot?
I was in the impression that 10M will be used and it will be scratched to
3G whenever required as same is set globally?

On Wed, Nov 30, 2011 at 10:22 PM, Paul DuBois wrote:

> The session value (10M in your case) will be used for queries issued in
> that session.
>
> On Nov 30, 2011, at 9:38 AM, Stdranwl wrote:
>
> > Ok it is fine . but I just wanted to to know on following:
> > Let say sort_buffer_size is set 10 M and Globally it is set 3G so how it
> will be used?
> >
> > On Wed, Nov 30, 2011 at 8:47 PM, Paul DuBois 
> wrote:
> >
> > On Nov 30, 2011, at 4:04 AM, Stdranwl wrote:
> >
> > > Hi
> > > I can see different values when I run show global variables like
> > > . && show variables like .? could any body please
> > > revert me on the scope and how they works?
> >
> >
> > These sections of the MySQL manual may be of interest:
> >
> > http://dev.mysql.com/doc/refman/5.5/en/using-system-variables.html
> > http://dev.mysql.com/doc/refman/5.5/en/show-variables.html
> > http://dev.mysql.com/doc/refman/5.5/en/set-option.html
> >
> > Individual variable descriptions are here:
> >
> > http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
> >
> > "Dynamic" means a variable can be set at runtime with SET.
> >
> > --
> > Paul DuBois
> > Oracle Corporation / MySQL Documentation Team
> > Madison, Wisconsin, USA
> > www.mysql.com
> >
> >
>
> --
> Paul DuBois
> Oracle Corporation / MySQL Documentation Team
> Madison, Wisconsin, USA
> www.mysql.com
>
>


Re: Global Variables

2011-11-30 Thread Stdranwl
Ok it is fine . but I just wanted to to know on following:
Let say sort_buffer_size is set 10 M and Globally it is set 3G so how it
will be used?

On Wed, Nov 30, 2011 at 8:47 PM, Paul DuBois  wrote:

>
> On Nov 30, 2011, at 4:04 AM, Stdranwl wrote:
>
> > Hi
> > I can see different values when I run show global variables like
> > . && show variables like .? could any body please
> > revert me on the scope and how they works?
>
>
> These sections of the MySQL manual may be of interest:
>
> http://dev.mysql.com/doc/refman/5.5/en/using-system-variables.html
> http://dev.mysql.com/doc/refman/5.5/en/show-variables.html
> http://dev.mysql.com/doc/refman/5.5/en/set-option.html
>
> Individual variable descriptions are here:
>
> http://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html
>
> "Dynamic" means a variable can be set at runtime with SET.
>
> --
> Paul DuBois
> Oracle Corporation / MySQL Documentation Team
> Madison, Wisconsin, USA
> www.mysql.com
>
>


Re: Global Variables

2011-11-30 Thread Rik Wasmus
> > DO NOT REPLY OFF-LIST
> 
> Also, do not shout :-)

Ugh point taken, but why are you still replying to him off-list? Keep 
inboxes clean! ;)
-- 
Rik Wasmus

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



Re: Global Variables

2011-11-30 Thread Johan De Meersman
- Original Message -
> From: "Reindl Harald" 
> 
> DO NOT REPLY OFF-LIST

Also, do not shout :-)

> the difference is "set" or "set global"

Same for show, and 'show variables' is implicitly the same as the clearer 'show 
session variables'.

> global is what would be used if the thread does not change it

That is, at connect time all the session variables are initialized from the 
global variables; and the session can then override them.

For status variables (like com_*), the globals are cumulative counters, while 
the session ones are this-session counters.


-- 
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

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



Re: Global Variables

2011-11-30 Thread Reindl Harald
DO NOT REPLY OFF-LIST

i do not understand what is unclear

you can set variables per sql and my.cnf
most of them, not all

the difference is "set" or "set global"
global is what would be used if the thread does not change it

the same as in php set a value per "php.ini" or ".htaccess"

Am 30.11.2011 11:28, schrieb Stdranwl:
> Thnx... So does it mean that global value is accumulative values and it is 
> the limit/end 
> of the value which can be assigned.?
> 
> On Wed, Nov 30, 2011 at 3:53 PM, Reindl Harald  <mailto:h.rei...@thelounge.net>> wrote:
> 
> 
> 
> Am 30.11.2011 11:04, schrieb Stdranwl:
> > Hi
> > I can see different values when I run show global variables like
> > . && show variables like .? could any body please
> > revert me on the scope and how they works?
> 
> a global variable is global and for all threads
> set without global is only for the current connection
> 
> 

-- 

Mit besten Grüßen, Reindl Harald
the lounge interactive design GmbH
A-1060 Vienna, Hofmühlgasse 17
CTO / software-development / cms-solutions
p: +43 (1) 595 3999 33, m: +43 (676) 40 221 40
icq: 154546673, http://www.thelounge.net/

http://www.thelounge.net/signature.asc.what.htm



signature.asc
Description: OpenPGP digital signature


Re: Global Variables

2011-11-30 Thread Reindl Harald


Am 30.11.2011 11:04, schrieb Stdranwl:
> Hi
> I can see different values when I run show global variables like
> . && show variables like .? could any body please
> revert me on the scope and how they works?

a global variable is global and for all threads
set without global is only for the current connection



signature.asc
Description: OpenPGP digital signature


Global Variables

2011-11-30 Thread Stdranwl
Hi
I can see different values when I run show global variables like
. && show variables like .? could any body please
revert me on the scope and how they works?


Re: do i have to restart the mysql server when i change some global variables?

2010-05-31 Thread Prabhat Kumar
Yes and No.
Its depend on the type of variable you have changed.
If its Dynamic , MySQL restart not required, else its required.

System variables can be set at server startup using options on the command
> line or in an option file. Most of them can be changed dynamically while the
> server is running by means of the 
> SETstatement, which 
> enables you to modify operation of the server without
> having to stop and restart it. You can refer to system variable values in
> expressions.
>

Check the complete list of variable. :
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html

Thanks,


On Mon, May 31, 2010 at 3:17 PM, Lin Chun  wrote:

> hi
>
> as the title
>
> thanks
>
> --
> -
> Lin Chun
>



-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat


Re: do i have to restart the mysql server when i change some global variables?

2010-05-31 Thread Suresh Kuna
unless and until if the variable is read-only, you don't need Lin.

On Mon, May 31, 2010 at 3:17 PM, Lin Chun  wrote:

> hi
>
> as the title
>
> thanks
>
> --
> -
> Lin Chun
>



-- 
Thanks
Suresh Kuna
MySQL DBA


do i have to restart the mysql server when i change some global variables?

2010-05-31 Thread Lin Chun
hi

as the title

thanks

-- 
-
Lin Chun


Re: how would mysqld restart affect dynamically set global variables?

2007-03-14 Thread Thiago LPS

dude

try put it on var/my.cf

set-variable = max_connections =  1024
set-variable = max_user_connections = 128
set-variable = table_cache=1200

:wq!


i have this working with a mysql3x
should be similar to mysql4/5x





On 3/14/07, Bing Du <[EMAIL PROTECTED]> wrote:


Hi,

We're running mysql 4.1.20.  If I understand the manual correctly, I can
change max_connections while mysqld is running without restart mysqld to
make the change take effect.  But what if mysqld restarts later in some
other situations, like machine reboot, would my (global) change on
max_connections remain?  I'm just very clear when to make dynamic changes
and when is better to put changes in my.cnf.  Please advise.

Thanks in advance,

Bing

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





--
--
Thiago LPS
C.E.S.A.R - Administrador de Sistemas
msn: [EMAIL PROTECTED]
0xx 81 8735 2591
--


Re: how would mysqld restart affect dynamically set global variables?

2007-03-14 Thread Alex Greg

We're running mysql 4.1.20.  If I understand the manual correctly, I can
change max_connections while mysqld is running without restart mysqld to
make the change take effect


Correct.


But what if mysqld restarts later in some
other situations, like machine reboot, would my (global) change on
max_connections remain?


No; you'll need to put it in my.cnf in order for it to persist after
mysqld is shut down.

-- Alex

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



Re: how would mysqld restart affect dynamically set global variables?

2007-03-14 Thread William R. Mussatto
On Wed, March 14, 2007 9:35, Bing Du said:
> Hi,
>
> We're running mysql 4.1.20.  If I understand the manual correctly, I can
> change max_connections while mysqld is running without restart mysqld to
> make the change take effect.  But what if mysqld restarts later in some
> other situations, like machine reboot, would my (global) change on
> max_connections remain?  I'm just very clear when to make dynamic changes
> and when is better to put changes in my.cnf.  Please advise.
>
> Thanks in advance,
>
> Bing
>
Put the changes in dynamically.  If they work change the my.cnf to make
them survive the next time mysql is restarted (for example on a reboot).



---

William R. Mussatto, Senior Systems Engineer
http://www.csz.com
Ph. 909-920-9154 ext. 27
FAX. 909-608-7061


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



Re: how would mysqld restart affect dynamically set global variables?

2007-03-14 Thread Steve Musumeche
I believe it would revert back to the settings in your my.cnf file.  If 
you want the change to be permanent, then set it there.


Steve Musumeche
CIO, Internet Retail Connection
[EMAIL PROTECTED]



Bing Du wrote:

Hi,

We're running mysql 4.1.20.  If I understand the manual correctly, I can
change max_connections while mysqld is running without restart mysqld to
make the change take effect.  But what if mysqld restarts later in some
other situations, like machine reboot, would my (global) change on
max_connections remain?  I'm just very clear when to make dynamic changes
and when is better to put changes in my.cnf.  Please advise.

Thanks in advance,

Bing

  


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



how would mysqld restart affect dynamically set global variables?

2007-03-14 Thread Bing Du
Hi,

We're running mysql 4.1.20.  If I understand the manual correctly, I can
change max_connections while mysqld is running without restart mysqld to
make the change take effect.  But what if mysqld restarts later in some
other situations, like machine reboot, would my (global) change on
max_connections remain?  I'm just very clear when to make dynamic changes
and when is better to put changes in my.cnf.  Please advise.

Thanks in advance,

Bing

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