<rdf:RDF
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xml:base='http://bliki.rimuhosting.com/rdf'>
    <s:Snip rdf:about='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/setting+up+mysql+replication'
         s:cUser='retep'
         s:oUser=''
         s:mUser='retep'>
        <s:name>knowledgebase/linux/miscapplications/setting up mysql replication</s:name>
        <s:content>In the master server [mysqld] section of /etc/my.cnf you should have something like:&#xD;&#xA;{code:none}&#xD;&#xA;[mysqld]&#xD;&#xA;server-id=1&#xD;&#xA;log-bin&#xD;&#xA;# so user changes do not replicate to the slaves&#xD;&#xA;replicate-ignore-db=mysql&#xD;&#xA;log-warnings&#xD;&#xA;log-slave-updates&#xD;&#xA;skip-bdb&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;On the master server run:&#xD;&#xA;{code:none}&#xD;&#xA;GRANT REPLICATION SLAVE ON *.* TO &#xD;&#xA;mysql_slave@slaveserverip identified by &apos;somepassword&apos;&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;In the slave MySQL server&apos;s /etc/my.cnf file you should have something like:&#xD;&#xA;{code:none}&#xD;&#xA;server-id       = 2&#xD;&#xA;log-bin&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;Note that the server ids need to be unique for all the servers in your mysql replication cluster.&#xD;&#xA;&#xD;&#xA;On the master server run: {code}SHOW MASTER STATUS{code}.&#xD;&#xA;&#xD;&#xA;On the slave server&apos;s MySQL client use some of the values from that command to run the following:&#xD;&#xA;&#xD;&#xA;{code:none}&#xD;&#xA;CHANGE MASTER TO MASTER_HOST=&apos;masterserverip&apos;&#xD;&#xA;, MASTER_USER=&apos;mysql_slave&apos;,  MASTER_PASSWORD=&apos;somepassword&apos;&#xD;&#xA;, MASTER_LOG_FILE=&apos;logfilenameperabove-bin.000003&apos;&#xD;&#xA;, MASTER_LOG_POS=perabove;&#xD;&#xA;&#xD;&#xA;SLAVE START;&#xD;&#xA;{code}&#xD;&#xA;</s:content>
        <s:mTime>2005-09-02 22:42:29.0</s:mTime>
        <s:cTime>2005-09-02 22:41:20.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux'/>
                <rdf:li rdf:resource='#knowledgebase'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/java/working with different character encodings'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/xen'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/mysql notes'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/miscapplications/rpm based php5.1 install'/>
                <rdf:li rdf:resource='http://bliki.rimuhosting.com/rdf#knowledgebase/linux/misc/where has my disk space gone'/>
            </rdf:Bag>
        </s:snipLinks>
        <s:attachments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
    </s:Snip>
</rdf:RDF>
