IT Community - Software Programming, Web Development and Technical Support

MySQL Server Variables

This is a discussion on MySQL Server Variables within the Database Support forums, part of the Web Development category; Hi, What is the Use of MySQL Server Variables? Regards sivaraman....


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Database Support

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 08-07-2007, 03:22 AM
sivaramakrishnan sivaramakrishnan is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 74
sivaramakrishnan is on a distinguished road
Post MySQL Server Variables

Hi,

What is the Use of MySQL Server Variables?

Regards
sivaraman.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-07-2007, 05:47 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL Server Variables

hi...

Mysql server have many server variables, they are used to configure the various components and aspects of the MySQL server, storage engines, client, and support tools. Each system variable has a default value. System variables can be set at server startup. Most of them can be changed dynamically while the server is running by means of the SET statement, which enables you to modify operation of the server without having to stop and restart it.


Regards,
S.Ashokkumar
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-07-2007, 07:25 AM
priyan priyan is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 133
priyan is on a distinguished road
Default Re: MySQL Server Variables

Are the system variable can be changed by any user or only by admin user ?

Also let me know if we can able to allow (Partially, limited access to modify the system variables) a common user to modify the system variables ?
__________________
Keep smiling...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-07-2007, 09:41 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: MySQL Server Variables

The User who has privilege to create session and alter session can modify some basic system variable as per the session.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-08-2007, 01:11 AM
sivaramakrishnan sivaramakrishnan is offline
D-Web Programmer
 
Join Date: Feb 2007
Posts: 74
sivaramakrishnan is on a distinguished road
Thumbs up Re: MySQL Server Variables

Hi,

I want to change some variable values in mysql datebase (EX:system_time_zone,wait_timeout,sort_buffer_size ) is it possible in sever variable.

Regards
sivaraman

Last edited by sivaramakrishnan : 08-08-2007 at 01:29 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-08-2007, 06:25 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: MySQL Server Variables

Hi Sivaram,

Yes u change the values of some server variables manually for active session using commands below,

SHOW variables LIKE 'wait_timeout';
Quote:
Variable_name = wait_timeout
Value = 30000
Quote:
SET @@wait_timeout = 40000;
Quote:
Variable_name = wait_timeout
Value = 40000
SHOW variables LIKE 'sort_buffer_size';
Quote:
Variable_name = sort_buffer_size
Value = 524280
Quote:
SET @@sort_buffer_size = 5243000;
Quote:
Variable_name = sort_buffer_size
Value = 5243000
Where as the system_time_zone variable could not be changed due to the reason there will be some job scheduling which activates the time zone variable as per daylight savings.

Hope its clear !!!
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-09-2007, 03:59 AM
write2ashokkumar write2ashokkumar is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 85
write2ashokkumar is on a distinguished road
Default Re: MySQL Server Variables

hi...

We can change the some server variable globally....

Syntax :


SET GLOBAL variable_name = value;

Example :


SET GLOBAL group_concat_max_len = 65535;


If we change a session system variable, the value remains in effect until our session ends or until we change the variable to a different value. The change is not visible to other clients.

If we change a global system variable, the value is remembered and used for new connections until the server restarts. The change affects the corresponding session variable only for clients that connect after the change.


Regards,
S.Ashokkumar.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-09-2007, 05:33 AM
Murali Murali is offline
D-Web Master
 
Join Date: Feb 2007
Location: India-Chennai.
Posts: 386
Murali is on a distinguished road
Send a message via AIM to Murali
Default Re: MySQL Server Variables

Yes Ashok we can set the values for some global variable present in the server temporarily till the system restarts.

If we need that value to be set permanently then we need to change the server parameter values in the mysql config file.
__________________
-Murali..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/3192-mysql-server-variables.html
Posted By For Type Date
DiscussWeb IT Community - Fusing This thread Refback 08-07-2007 11:02 PM

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install Mysql in Linux server? write2ashokkumar Server Management 1 12-14-2007 04:24 AM
Importing mysql dump file to my Local Server Murali Database Support 1 12-12-2007 07:10 AM
ERROR 2002 (HY000): Can't connect to local MySQL server through socket Gopisoft Database Support 1 10-29-2007 03:07 AM
How to get the Post values without using Server Variables? senraj PHP Programming 6 10-17-2007 11:31 PM
I need to find out how many client connections were aborted by MySQL server Sabari Database Support 1 07-17-2007 04:34 AM


All times are GMT -7. The time now is 03:48 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0