![]() |
Difference between MySQL databases
Does anyone have ideas on how to do a difference between databases?
For example, I have 50 tables in a database on some software that I bought. I want to take a snapshot of the database, upload a photo, edit a gallery, then take another snapshot of the database to see what changed. Any ideas on how I can do that? > mysql databaseB - databaseA I am thinking to do a dump of the database, make a new DB, then source it. Make my changes on the site... But then how do I do a "difference of everything in all tables" dump? |
So just do two dumps or setup a master-slave relationship with binlogs and setup query logging on the slave; when done just drop the slave association/etc.
|
Good luck.
|
The last post says how you would do it. But what are you ultimately trying to do? Reverse engineer? Have 2 versions of a site with an admin on one and not the live server?
|
show table status; -- should tell you which tables have changed, and then you can look in the table.. if that's not enough you could...
mysql -e 'select * from table' > before.txt .. do your stuff here .. mysql -e 'select * from table' > after.txt then; diff before.txt after.txt |
Quote:
|
bump 4 answers
|
Why not just enable the query log and see what queries were executed?
- http://dev.mysql.com/doc/refman/5.1/en/query-log.html |
Quote:
Yes, I am trying to reverse engineer a table. I have software to populate with data, and don't want to manually do it. So I'm hoping I can write a little php script that populates data automatically. |
All times are GMT -7. The time now is 10:42 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123