master/slave mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ubuntu-geek
    New Member
    • Oct 2004
    • 13
    • 3.0.3

    master/slave mysql

    It's my understand that when setting the slave variables in the config.php all reads will be directed to the slave and all writes to the master.

    Running 3.6rc2 it appears even though the slave variables are set the reads still run off the master..

    Anyone have any thoughts?
    My Blog | Fivebean Hosting
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Only certin "safe" queries get sent to the slave server. Scott would have a better anwser for you. I'll try to track him down.

    Comment

    • ubuntu-geek
      New Member
      • Oct 2004
      • 13
      • 3.0.3

      #3
      Gotcha.. I'll check back for his response.. thanks
      My Blog | Fivebean Hosting

      Comment

      • Scott MacVicar
        Former vBulletin Developer
        • Dec 2000
        • 13286

        #4
        You need to change the class name too from mysql to something else which I can't quite remember. This wasn't the case in 3.5.x when replication was built into the base class.

        mysql_slave slave_mysql or something along those lines, I'm pretty sure I updated config.php with the value in the comment above it.
        Scott MacVicar

        My Blog | Twitter

        Comment

        • ubuntu-geek
          New Member
          • Oct 2004
          • 13
          • 3.0.3

          #5
          Gotcha, changed that variable and things are happy.. Thanks for the tip..
          My Blog | Fivebean Hosting

          Comment

          • Scott MacVicar
            Former vBulletin Developer
            • Dec 2000
            • 13286

            #6
            On a side note, I met Mark Shuttleworth yesterday

            He gave another great talk at the coference I was attending.
            Scott MacVicar

            My Blog | Twitter

            Comment

            • Gomjaba
              Senior Member
              • Jan 2005
              • 970
              • 3.5.x

              #7
              One question : If I setup a slave database on a board which is running for a year now (RC2 now) - is it replicating automaticially to the slave ?
              Also, why isn't there a config for the slave database name in the config.php ?
              Last edited by Gomjaba; Mon 24 Jul '06, 2:27am.
              I'm not under the alkafluence of inkahol like some thinkle peep I am!

              Comment

              • Scott MacVicar
                Former vBulletin Developer
                • Dec 2000
                • 13286

                #8
                Replication is a MySQL feature, you'll need to manually configure it in MySQL to replicate a database to a second MySQL server.

                The database name should be the same on both servers.
                Scott MacVicar

                My Blog | Twitter

                Comment

                • ubuntu-geek
                  New Member
                  • Oct 2004
                  • 13
                  • 3.0.3

                  #9
                  Originally posted by Scott MacVicar
                  On a side note, I met Mark Shuttleworth yesterday

                  He gave another great talk at the coference I was attending.
                  Very cool
                  My Blog | Fivebean Hosting

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...