473,383 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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?

Mar 19 '07 #1
6 10545
ke**********@gmail.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.
js*******@attglobal.net
==================
Mar 19 '07 #2
>
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
Mar 19 '07 #3
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
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

Mar 19 '07 #4
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!
Mar 19 '07 #5
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.
js*******@attglobal.net
==================
Mar 19 '07 #6
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.
Mar 19 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marc | last post by:
Hello, Newbie here..... Searching and working this for a week now. We too are having the same problems. Using MySql 4.0.14 and there are "no problems" at all.
0
by: R. Tarazi | last post by:
Hello, We are planning to reprogramm our search machine and website. Since we have call agents who query the same database as the customers do, we had the idea of splitting the database to 2...
1
by: Frank Natoli | last post by:
Does MySQL provide any database mirroring capability? Across workstations or servers? What would that be? Any problem with simply copying the files?
39
by: Mairhtin O'Feannag | last post by:
Hello, I have a client (customer) who asked the question : "Why would I buy and use UDB, when MySql is free?" I had to say I was stunned. I have no experience with MySql, so I was left sort...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
5
by: linuxlover992000 | last post by:
I am a newbie in the world of MySQL. In fact I enabled it in my Linux box only because it is required to run WordPress (the blogging software). I was trying to plan ahead and figure out a way to...
2
by: ¥|¥J | last post by:
Dear all, Please help~~ I have a problem in connecting my new FC5 webserver (apache 2.2 + php 5.1.4) to a few database servers through the PHP scripts (RH9, FC2, FC3). I have set host...
0
Coldfire
by: Coldfire | last post by:
Since i cannot show the differences in a two-column like table. I am first putting MS SQL Server 2005 and then MySQL 5.x. MS SQL Server 2005 Brief Overview - SQL Server is a full-fledged...
1
by: Andy | last post by:
I want to store a key in an ASP.NET session variable that points to an ASP.NET page cache. The page cache contains an XML document that holds a draft of the user's work. After the user is...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.