Skip to content

hardeepvicky/DB-Sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB-Sync : Mysql Sync Tool

This tool use to sync database among developers working in git version control project. In this each git branch have seprate changes logs written in local drive. To distribute the change, Developer have to write database changes to then push them to git

Important Note : I tested with Mysql Workbench. it is strongly recommended that use Mysql Workbench. Beacuse it log all its queries to mysql.general_log table correctly. Other tool like phpmyadmin do not log query correctly.

# Setup

  • Download this code, put inside public directory of working project. so that u can access from web browser http://[project-domain]/DB-Sync
  • Rename config.sample.php to config.php
  • Change Constant BASE_URL(url path of db sync), DEVELOPER(Developer Name), Git Path : git_version("[PATH]"), wheres [PATH] is path of your project where .git is located
  • Change static database config
  • Mysql Setting - Run Following Queries whenever you start mysql service.
    • SET GLOBAL log_output = 'TABLE';
    • SET GLOBAL general_log = 'ON';