Mysql database version control dbv use _ MySQL

Source: Internet
Author: User
Version control software has svngit and so on. these tools control the source code version very well, but what about database version control? The traditional method is to export the entire database, so the efficiency of team collaboration is very low. Is there a tool that can easily synchronize the database structure? Yes, there are also many versions. the version control software has svn git and so on. these tools control the source code version very well, but what about database version control? The traditional method is to export the entire database, so the efficiency of team collaboration is very low. Is there a tool that can easily synchronize the database structure? Yes, there are also many. I use dbv to integrate it into PHP + MYSQL projects, which is very convenient.

Dbv1.1 download https://github.com/victorstanciu/dbv/archive/1.1.zip

Usage:

1. after downloading the package, decompress it to the project directory under the software control of git or SVN version. for example, if my project directory is 93zp_project, after unzipping, dbv is in 93zp_project/dbv-master, set dbv-master/data to writable.

2. change config. conf. sample to config. conf and change it to the following Red place:

Define ('Db _ host', 'localhost ');
Define ('Db _ port', 3306 );
Define ('Db _ username', 'root ');
Define ('Db _ password', '123 ');
Define ('Db _ name', '93zp ');

93zp is the database for version control.

3. access http: // localhost/93zp_project/dbv-master/index. php and enter the user name dbv and password dbv. you can modify the user name and password in config. conf. The database table of 93zp is displayed. the following page is displayed for each modification record:

Column [In DB] indicates whether the record is In the database, and column [On disk] indicates whether the record is exported to the hard disk. The value of On disk is NO, indicating that NO modification records have been exported.

4. press the "Export to disk" button to Export the record, so that the modification record can be saved under dbv-master/data/schema.

After the team members update the project, they also access http: // localhost/93zp_project/dbv-master/index. php can see which records need to be imported to the database. check the corresponding records and click [push to databse] to synchronize the database! After synchronization, the In DB is In the YES state. for example, both the aaa and ssss modification records have been synchronized.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.