Difference between MySQL databases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • camperjohn64
    Confirmed User
    • Feb 2005
    • 1531

    #1

    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?
    www.gimmiegirlproductions.com
  • GrouchyAdmin
    Now choke yourself!
    • Apr 2006
    • 12085

    #2
    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.

    Comment

    • fatfoo
      ICQ:649699063
      • Mar 2003
      • 27763

      #3
      Good luck.
      Send me an email: [email protected]

      Comment

      • AdultSoftwareSolutions
        Confirmed User
        • Mar 2009
        • 193

        #4
        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?
        Adult Software Solutions (ICQ 559884738)
        PHP, MySQL, Flash, Actionscript, Java, Wowza, CMS, Tube, VOD, CRM, Dating, Social Networks, Paysites, TGPs, Directories and more.
        If you can think it I can build it.

        Comment

        • Brujah
          Beer Money Baron
          • Jan 2001
          • 22157

          #5
          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

          Comment

          • BestXXXPorn
            Confirmed User
            • Jun 2009
            • 2277

            #6
            Originally posted by Brujah
            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
            That's how I'd do it...
            ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

            Comment

            • LoveSandra
              So Fucking Banned
              • Aug 2008
              • 10551

              #7
              bump 4 answers

              Comment

              • drocd
                Confirmed User
                • Aug 2007
                • 128

                #8
                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
                230-699

                Comment

                • camperjohn64
                  Confirmed User
                  • Feb 2005
                  • 1531

                  #9
                  Originally posted by drocd
                  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
                  Awesome!

                  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.
                  www.gimmiegirlproductions.com

                  Comment

                  Working...