List:General Discussion« Previous MessageNext Message »
From:Shawn Green Date:September 7 2007 8:46pm
Subject:Re: Use of slave server for read only queries
View as plain text  
Ashok Chauhan wrote:
> Hi All,
> 
> I'm using Mysql 5 (with replication) on CentOS 4.4 OS with 2 CPU and 8GB
> of RAM.
> Master & Slave servers have same hardware configration.
> 
> Now i want to know, should i use slave server for fetching read only
> queries.
> if yes, then how ?.
> 
> Thanks
> Ashok
> 
> 

The simple way is to use the --read-only startup parameter on the slave. 
The only updates it will allow must come through replication or from a 
SUPER user.

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#option_mysqld_read_only



-- 
Shawn Green, Support Engineer
MySQL Inc., USA, www.mysql.com
Office: Blountville, TN
     __  ___     ___ ____  __
    /  |/  /_ __/ __/ __ \/ /
   / /|_/ / // /\ \/ /_/ / /__
  /_/  /_/\_, /___/\___\_\___/
         <___/
  Join the Quality Contribution Program Today!
  http://dev.mysql.com/qualitycontribution.html

Thread
Use of slave server for read only queriesAshok Chauhan7 Sep
  • Re: Use of slave server for read only queriesVetle Roeim7 Sep
  • Re: Use of slave server for read only queriesShawn Green7 Sep