|
|
|
|
![]() ![]() |
May 12 2005, 03:26 AM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 20 Joined: 6-May 05 Member No.: 4,780 |
Hi..I want to ask if its possible to automatically mirror my mysql databases into another mysql server?or create a small php script to do this?
The reason is because, we all know that database is very improtant if we have dynamic website. I have my forum hosted and i want to automatically mirror this or backup into another mysql server(free). Like in freesql.org. So that im not afraid that i forgot to backup my database..also i have one central backup database. Thanks for the help..Im looking forward for this posibility. |
|
|
|
May 12 2005, 07:52 AM
Post
#2
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Hi sirknight,
[/tab]MySQL in itself provides an excellent way of mirroring your databases - but for that you have to set up another server somewhere known as a Replication Server - usually the Master Server and the Replication Server exist on the same network, to enable faster updates. [tab]Problem with this is, you Master Server has to be configured to recognize the Slave Replicator (you can specify this in the my.cnf file) and the Slave will also have to be trained to get updates from the master. The process is very simple and can be done in a short few steps. [/tab]If the setup is done in this format, the Master Server keeps generating some files called Binary Logs, that contain information about incremental changes to your databases. The Slave's run TWO threads - one which keeps fetching these Binary logs down to the Slave, and another thread, which acts upon the logs, figures out what changes have been made and immediately updates its own databases with the changes pulled out from the master. [tab]You can periodically keep deleting the binary logs, as they keep on being generated and eat up ur disk space. The thread that fetches the logs, maintains a persistent connection - which means, as soon as the master generates a log, it's pulled out by the slave. The updates can happen anytime later on coz the slave has already got hold of the update information. Even if the link fails in between, the slave can later on work on the logs stored on it's own drive and do the updates properly. The process is extremely efficient and I've got one running on my own LAN for testing purposes. It's works out AWESOME But with free hosting services and even with most paid ones, I don't think they'll be ready to change their my.cnf to point to your replication server - still it's worth a try... Hope this will guide you to the right direction. If you need more information, post again... Regards, m^e |
|
|
|
May 12 2005, 09:01 AM
Post
#3
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 20 Joined: 6-May 05 Member No.: 4,780 |
You get my point. Thanks,.But i want to replicate or mirror my database here in asta host to another site.Actually this is much related to my other post, and as you have said astahost did not allow to access my mysql database from other site.
|
|
|
|
May 12 2005, 11:44 AM
Post
#4
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
See as far as I <-- know, asta databases limit the access to only the asta web-server. But then again, I might be wrong
Regards, m^e |
|
|
|
Jul 3 2008, 10:23 AM
Post
#5
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 1 Joined: 3-July 08 Member No.: 31,269 |
this might be very helpful to your prob.. see this : http://codingtricks.blogspot.com/2008/02/c...ysql-db-to.html
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 12:32 PM |