How to mirror MySQL database on two servers with PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kennthompson@gmail.com

    #1

    How to mirror MySQL database on two servers with PHP?

    What is the best way to mirror mysql on a remote server for backup in
    case the local server is down?

  • Jerry Stuckle

    #2
    Re: How to mirror MySQL database on two servers with PHP?

    kennthompson@gm ail.com wrote:
    What is the best way to mirror mysql on a remote server for backup in
    case the local server is down?
    >
    Why are you asking this in a PHP newsgroup? It has nothing at all to do
    with PHP.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Man-wai Chang

      #3
      Re: How to mirror MySQL database on two servers with PHP?

      >
      Why are you asking this in a PHP newsgroup? It has nothing at all to do
      with PHP.
      >
      What's wrong about using PHP to mirror a MySQL table? :)

      --
      iTech Consulting Services Limited
      Expert of ePOS solutions
      Website: http://www.itech.com.hk (IE only)
      Tel: (852)2325 3883 Fax: (852)2325 8288

      Comment

      • Martin Mandl - m2m tech support

        #4
        Re: How to mirror MySQL database on two servers with PHP?

        On Mar 19, 5:22 am, Man-wai Chang <toylet.toy...@ gmail.comwrote:
        Why are you asking this in a PHP newsgroup? It has nothing at all to do
        with PHP.
        >
        What's wrong about using PHP to mirror a MySQL table? :)
        >
        --
        iTech Consulting Services Limited
        Expert of ePOS solutions
        Website:http://www.itech.com.hk(IE only)
        Tel: (852)2325 3883 Fax: (852)2325 8288
        Dear Man-Wai,

        I guess it would be much slower than using the MySQL functionality
        (e.g. mysqldump) directly. With php you would have to lock your host
        database, dump the data, unlock the host database, lock the slave
        database, upload the data, unlock the slave database ... MySQL has
        even some functions toee directly synchronize host & slave without
        having to generate the dump ...

        Good luck
        Martin


        ------------------------------------------------
        online accounting on bash bases
        Online Einnahmen-Ausgaben-Rechnung

        ------------------------------------------------
        m2m server software gmbh


        Comment

        • Toby A Inkster

          #5
          Re: How to mirror MySQL database on two servers with PHP?

          Man-wai Chang wrote:
          What's wrong about using PHP to mirror a MySQL table?
          It's a nasty hack.

          Better to use something like:
          http://www.mysql.com/products/database/cluster/

          However, MySQL Cluster is not Free Software, so it might be worthwhile
          instead to port your site to PostgreSQL, which has an Open Source
          replication system called Slony-I <http://slony.info/>.

          --
          Toby A Inkster BSc (Hons) ARCS
          Contact Me ~ http://tobyinkster.co.uk/contact
          Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

          * = I'm getting there!

          Comment

          • Jerry Stuckle

            #6
            Re: How to mirror MySQL database on two servers with PHP?

            Man-wai Chang wrote:
            >>
            >Why are you asking this in a PHP newsgroup? It has nothing at all to
            >do with PHP.
            >>
            >
            What's wrong about using PHP to mirror a MySQL table? :)
            >
            That wasn't the question.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Ivan Marsh

              #7
              Re: How to mirror MySQL database on two servers with PHP?

              On Mon, 19 Mar 2007 12:22:55 +0800, Man-wai Chang wrote:

              >Why are you asking this in a PHP newsgroup? It has nothing at all to
              >do with PHP.
              >>
              >>
              What's wrong about using PHP to mirror a MySQL table? :)
              Nothing... if you don't have the ability to use MySQL's tools to replicate
              your data.

              mysqldump can backup an entire MySQL server to a remote server in one
              command.

              Comment

              Working...