Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Snapshot of a MySQL Database
Old 08-04-2010, 08:24 PM Snapshot of a MySQL Database
Skilled Talker

Posts: 90
Location: Savannah, GA
Trades: 0
Does anyone know of a script (preferably PHP) that can take a snapshot of a MySQL database, similar to a backup made in phpMyAdmin but then compare it to future snapshots outputting only the changes.

Ideally I would like to test changes on a MySQL database, once satisfied I would like to run the script, grab the structural changes of the database then update the production database with those changes. Like subversion for MySQL!

DB 1.0
ID = tinyint(3)
Name = varchar(63)

DB 2.0
ID = mediumint(4)
Name = varchar(63)


The script would compare DB 1.0 to DB 2.0 and output

ALTER TABLE `test` CHANGE `ID` `ID` MEDIUMINT( 4 ) NOT NULL

The script would not care about the data within the table, however if it did I could just ignore it.

Thanks
__________________
-Mike
-
Please login or register to view this content. Registration is FREE
mgarde is offline
Reply With Quote
View Public Profile Visit mgarde's homepage!
 
 
Register now for full access!
Old 08-04-2010, 09:08 PM Re: Snapshot of a MySQL Database
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
I don't know about what you're looking for, but I suppose you could output the database to a CSV file and then compare from there with other CSVs. Many speadsheets have a compare feature, but I'm not a spreadsheet person, don't take my word on that
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 08-08-2010, 05:31 PM Re: Snapshot of a MySQL Database
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I think http://www.mysqldiff.org/ does what you want.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 08-08-2010, 11:52 PM Re: Snapshot of a MySQL Database
Skilled Talker

Posts: 90
Location: Savannah, GA
Trades: 0
Mr. Miller, this is exactly what I am looking for.

Thank You
-Mike
__________________
-Mike
-
Please login or register to view this content. Registration is FREE
mgarde is offline
Reply With Quote
View Public Profile Visit mgarde's homepage!
 
Old 08-10-2010, 04:09 PM Re: Snapshot of a MySQL Database
Extreme Talker

Posts: 149
Trades: 0
good thread, thanks miller
__________________
Free
Please login or register to view this content. Registration is FREE

Visit our
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
mimamo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Snapshot of a MySQL Database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16324 seconds with 12 queries