473,659 Members | 2,836 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10563
ke**********@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.
js*******@attgl obal.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*******@attgl obal.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
3303
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
1509
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 servers. The call agents can update customer data with our intern webinterface, which not only concerns tables that are for the call agents, but also concerns tables of the search machine, holding company data such as address, search words, etc.
1
5549
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
8392
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 of stammering and sputtering, and managed to pull out something I heard a couple of years back - that there was no real transaction safety in MySql. In flight transactions could be lost.
15
4596
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 communicate with a MySQL database table on a web server, from inside of my company's Access-VBA application. I know VBA pretty well but have never before needed to do this HTTP/XML/MySQL type functions.
5
15397
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 backup (and restore) a database, should my Linux machine ever goes belly up. I disovered that the databases are stored in subdirectories under /var/lib/mysql. My questions are basically three: (1) Why /var/lib? Why not some /home/mysql or...
2
1678
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 privileges correctly for the database servers. It seems that after I migrated the php files (originally in each database server) to the centralised FC5 webserver, it failed to work. Is it because of the PHP5 is compiled with MySQL version 4 +? Since...
0
12885
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 database system developed specifically for large enterprise databases. All advanced features of a relational database are fully implemented. - Once you purchase the product, you are only limited to the Sybase-derived engine.
1
2152
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 finished with their draft, it gets posted and permenantly saved in the database. If the session timesout after a few minutes of idlement, the user doesn't loose their work when the page cache is set to have a far longer timeout. The user just has to...
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8525
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.