Hello! I have developing a PHP/MySql web application with a team. We
are all located in different locations, so we cannot have anything
running on one local server.
We have a CVS setup on a virtual host for the php files, and that has
been working out great. Everyone has a local copy of the site, that
they can work on without being connected to the net and when they are
done working on something, they commit it to the cvs and then everyone
can get it from there.
The problem we have been having is keeping all of our local mysql
databases in sync. We each have a local php/mysql setup running (with
something like wamp). And once in a while while coding, we update the
local database...and after a week or two, we all end up with different
databases.
Is there some way that we can keep our database in sync (other than
hosting the database on the virtual host, because we want to be able to
work on this site when not on the internet (like in an airplane))? Is
there some way to "CVS" a database?
BTW, We have tried using phpmyadmin to dump the entire database to a
sql file and sending that to everyone, but it is a real pain updating
databases in that way because when you try to import that sql file back
on another database, phpmyadmin will timeout, so we have to break down
the file into smaller files etc.
If someone could point me to a good free/open source solution to this
problem, I would be grateful. If you need me to clarify the problem
further, please do not hesitate to ask. Thank you!
- Nimit 4 2717
Nimit (ni********@gma il.com) wrote:
: Hello! I have developing a PHP/MySql web application with a team. We
: are all located in different locations, so we cannot have anything
: running on one local server.
: We have a CVS setup on a virtual host for the php files, and that has
: been working out great. Everyone has a local copy of the site, that
: they can work on without being connected to the net and when they are
: done working on something, they commit it to the cvs and then everyone
: can get it from there.
: The problem we have been having is keeping all of our local mysql
: databases in sync. We each have a local php/mysql setup running (with
: something like wamp). And once in a while while coding, we update the
: local database...and after a week or two, we all end up with different
: databases.
: Is there some way that we can keep our database in sync (other than
: hosting the database on the virtual host, because we want to be able to
: work on this site when not on the internet (like in an airplane))? Is
: there some way to "CVS" a database?
: BTW, We have tried using phpmyadmin to dump the entire database to a
: sql file and sending that to everyone, but it is a real pain updating
: databases in that way because when you try to import that sql file back
: on another database, phpmyadmin will timeout, so we have to break down
: the file into smaller files etc.
: If someone could point me to a good free/open source solution to this
: problem, I would be grateful. If you need me to clarify the problem
: further, please do not hesitate to ask. Thank you!
: - Nimit
Are you referring to the data within the database, or the database
structures (table definitions etc)?
--
This space not for rent.
Here's how we handle this:
First of all, we have our production database. Presumably, any changes
you make to the development database will ultimately need to be made in
production.
For each release, we have a "fix" directory that contains all the
scripts necessary to "upgrade" the production database to the next
release. In our case, we have individual scripts for each
table/view/stored procedure/etc. that needs to change. There is also a
release script, which basically just calls all the individual scripts
in the right order. This whole directory is stored in CVS. As people
need to change stuff in the DB, they either create a new script or
update an existing script -- then make sure it's called in the release
script.
So, at any point, you can restore a backup of production, then run your
release script. This brings the whole database up to the next release.
It also allows you to catch errors in the script(s), which is good
since they will ultimately run against a production database.
Some of us also run instances of the database server on our local
machine. If you do this in conjunction with a webserver, everyone can
have their own, local mirror of production on which to do development.
To synchronize your databases, simply load up a recent production
backup onto your local box, update your CVS directory containing all
the fixes, then run the fix script. Voila!
I use these bash scripts to commit DB changes to CVS:
//----Dump DB--------------------------------------
#!/bin/sh
clear
db[0]="db_bplot"
db[1]="db_jobs"
db[2]="db_print_supp lies"
db[3]="db_tracker "
db[4]="db_intrane t"
for x in "${db[@]}"
do
echo -n "Dumping $x..."
mysqldump -u XXX -pXXX --add-drop-table -B $x > $x.sql;
echo " Done."
done
echo -n "Creating dbs.tar.bz2..."
tar cjpf dbs.tar.bz2 db_*;
echo " Done."
for x in "${db[@]}"
do
rm $x.sql;
done
//-------------Import DB--------------------------------------------
#!/bin/sh
clear
db[0]="db_bplot"
db[1]="db_jobs"
db[2]="db_print_supp lies"
db[3]="db_tracker "
db[4]="db_intrane t"
echo -n "Extracting dbs.tar.bz2..."
tar jxf dbs.tar.bz2
echo " Done."
for x in "${db[@]}"
do
echo -n "Updating $x..."
mysql -u XXX -pXXX --execute="drop database $x"
mysql -u XXX -pXXX --execute="create database $x"
mysql -u XXX -pXXX < $x.sql
rm $x.sql
echo " Done."
done
Hope this helps! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Gary L. Burnore |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.mysql
This is an invitation to discuss the following proposal to create
newsgroup comp.databases.mysql. Please note that YOU CANNOT VOTE NOW;
you may be able to vote on a version of this proposal later. See the
PROCEDURE section below if you need information about how the
discussion works.
PLEASE POST ANY FOLLOWUPS TO THE NEWSGROUP NEWS.GROUPS.
|
by: William Drew |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.mysql
This is an invitation to discuss the following proposal to create newsgroup
comp.databases.mysql. Please note that YOU CANNOT VOTE NOW; you may be
able to vote on a version of this proposal later. See the PROCEDURE section
below if you need information about how the discussion works.
PLEASE POST ANY FOLLOWUPS TO THE NEWSGROUP NEWS.GROUPS.
|
by: Cara |
last post by:
LAST CALL FOR VOTES (of 2)
unmoderated group comp.databases.etl
Newsgroups line:
comp.databases.etl Extraction, transformation, loading issues.
Votes must be received by 23:59:59 UTC, 12 Dec 2003.
This vote is being conducted by a neutral third party. Questions
about the proposed group should be directed to the proponent.
|
by: Hai-Chu Hsu |
last post by:
Hi,
I want to restore my databases from the old SQL Server installation
into a new installation of SQL Server. My new installation of SQL
Server has different data path from the old installation. In addition,
the data owners of some databases in the old SQL Server installation
are not dbo. I have backups for all the databases in the old
installation SQL Server.
Can anyone tell me how to restore my databases from the old SQL Server
|
by: Cara Altman |
last post by:
REQUEST FOR DISCUSSION (RFD)
unmoderated group comp.databases.etl
This is a formal Request For Discussion (RFD) for the creation of a
world-wide unmoderated Usenet newsgroup comp.databases.etl. This is
not a Call for Votes (CFV); you cannot vote at this time. Procedural
details are below.
| |
by: Amit |
last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum>
or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does
anyone know why? I'm on v8 fp 5
output :
db2 => list active databases at dbpartitionnum 1;
SQL0104N An unexpected token "1" was found following "<identifier>".
Expected tokens may include: "GLOBAL". SQLSTATE=42601
db2 => list active databases at GLOBAL;
|
by: com |
last post by:
Extreme Web Reports 2005 - Soft30.com
The wizard scans the specified MS Access database and records
information such
as report names, parameters and subqueries. ...
www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages
MDBSecure 1.0.8.0 - Soft30.com
Utility which makes it easy to create secure MS Access Databases, ...
MS Access
2000/2003 format. 30 day money back guarantee, 30 day trial. ...
|
by: Andy |
last post by:
Someone posted this official proposal to create
comp.databases.postgresql.general again. He wrote his own charter. As
far as I know, he did not consult any of the postgresql groups first.
There may be an upcoming vote on this, so please stay informed and read
news.newgroups.announce for updates.
Also see message <2uu44nF2eodc0U1@uni-berlin.de> for an example of the
proponent's temperament.
|
by: Tjerk Wolterink |
last post by:
Don't know wether this is the right newsgroup,
anyways:
Has anyone some experience with Native XML Databases.
Im planning to use this:
http://exist.sourceforge.net/
It has many advantages over Object Relational Mapping,
(that is how i do it now).
|
by: AK |
last post by:
Hi
Our product uses MS-SQL Server 2000. One of our customer has 10
installations with each installation stroring data in its own database.
Now the customer wants to consolidate these databases into one and we
already have plan for that by consolidating one DB at a time. But first
they want to find how many unique or duplicate entries they have across
all the 10 databases
Assumptions:
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |