dbv数据库乱码
It’s good practice to always use a version control system in any of your projects. Be it a side-project in which you are the only developer, or a team project where five or more people are working on it together. But the idea of putting your database into version control isn’t really that widespread. Often times we take the database for granted.
最好在任何项目中始终使用版本控制系统。 它是您是唯一开发人员的附带项目,还是五个或更多人一起工作的团队项目。 但是,将数据库置于版本控制中的想法并不是很普遍。 通常,我们认为数据库是理所当然的。
But like the source files in our project, the database is constantly changing too. That’s why we also need a way to track the changes that we have made and easily share it to other members of our team.
但是,就像我们项目中的源文件一样,数据库也在不断变化。 这就是为什么我们还需要一种方法来跟踪所做的更改并将其轻松共享给我们团队的其他成员。
In this article we will take a look at DBV, a database version control system written in PHP for MySQL databases so you need to have PHP and MySQL installed before you can use it, along with a web server like Apache or Nginx.
在本文中,我们将介绍DBV ,这是一个用PHP编写MySQL数据库版本控制系统,用于MySQL数据库,因此您需要先安装PHP和MySQL,再使用Web服务器(例如Apache或Nginx)。
An important note about this software is that it is not a stand-alone database version control system, because it needs a version control system such as Git, Mercurial or SVN for syncing changes with your team.
关于此软件的重要说明是,它不是独立的数据库版本控制系统,因为它需要一个版本控制系统(例如Git,Mercurial或SVN)来与您的团队同步更改。
安装DBV (Installing DBV)
To start working with DBV, first you have to download the installer from their website, extract it into your project directory then rename the resulting folder to dbv
. This will give you the following path:
要开始使用DBV,首先必须从他们的网站下载安装程序,将其解压缩到项目目录中,然后将结果文件夹重命名为dbv
。 这将为您提供以下路径:
my_project/dbv
An alternative approach is just cloning from Github.
另一种方法是从Github克隆。
DBV配置 (DBV Configuration)
You can start configuring the options for DBV by creating a copy of the config.php.sample
file and renaming it to config.php
.
您可以通过创建config.php.sample
文件的副本并将其重命名为config.php
来开始配置DBV的选项。
The most important things to update here are the first two sections. Just substitute the values for my_username
, my_password
, my_database
for the values in your current database configuration:
这里最重要的更新是前两个部分。 只需将my_username
, my_password
和my_database
的值my_database
为当前数据库配置中的值:
<?php
/**
* Your database authentication information goes here
* @see