Giter VIP home page Giter VIP logo

mysql-database-synchronization-with-php's Introduction

#mysql-database-synchronization-with-php

Synchronize MySQL Database from One Server to Another Server or from One Database to Another Database on the same server using Simple PHP Script.

The source code is available at github. You can either clone the repository or download a zip file of the latest release.

Requirement

1. cURL should be enabled

How To Use

1. copy & paste `server1` directory files on your first server.

2. set database details for the database which you want to synchronize to another database in 
	`includes/config.php` file.

3. copy & paste `server2` directory files on your second server. 

4. set Synchronization URL in `includes/config.php` which should have `server2` directory files. 

5. set database details for the database where you want to synchronize first database data.

6. execute `server1/example.php`

Example

`server1/example.php` (Send Data to server2/example.php)

To make it automatic synchronization on particular interval, you can run the 
server1/example.php as cronjob on specific time.

Output

Array
(
    [data] => Array
        (
            [bh_user_master] => Table Created. 8 Rows Inserted.
            [bh_user_message] => Table Created.
        )

    [status] => success
    [message] => Database synchronization initiated.
)


Array
(
    [data] => []
    [status] => fail
    [message] => No Table Found./Table Structure Not Found./
)

Limitation :

1. This is just for the Development mode only demo. When the script 
	synchronize the database, first it will drop the table on second 
	server and create new table and after that insert all data. 
	During the synchronization time, f the server stopped to respond, 
	the second server database will be truncated. 


2. Synchronization time, table structure and all rows will be 
	synchronization to avoid the collumn/data updation after 
	last synchronization.

Author

Bharat Parmar

Ahmedabad, India.

Mobile : +91 9687766553 Email : [email protected]

mysql-database-synchronization-with-php's People

Contributors

bharat383 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.