Jump to content

How to Track Database Changes?


koopkoop

Recommended Posts

Is there a piece of software out there that can monitor a mysql database and give some kind of output as to what changes have been made?

 

I'm working with a PHP shopping cart (Magento) that has very poor product import support. To get around this, I'm writing my own product import script to inject products, and all of its associated values, directly into the database. However, I need to know exactly how the shopping cart is storing product information. To figure this out, I want to take a "snapshot" of the database before I add a product, then add a product through the shopping cart and then compare the database against the snapshot to see exactly where the shopping cart placed the values.

Link to comment
Share on other sites

if there is a single DB interface for all queries, then u can easily print queries which are fired. else i m not sure if there is any software which does DB monitoring like this , atleast i m not aware.

 

i will keep monitoring this post to see if anybody comes up with a name :) i will be interested.

Link to comment
Share on other sites

ah.....great magento, My best regards to you ( I know how much a pain in the a**  Magento is ).

 

And the easiest thing you can do is here is log all data written to the database, but since you are using Magento I really wouldn't recommend that as the relations in the database are extremely in-depth.

 

And if you are using 1.2 it should be very simple to export products.

 

And since Magento uses a complete Ajax interface it would be impossiable to profile the DB queries, unless you enable FirePHP for Zend :)

Link to comment
Share on other sites

Print queries isn't practical because the shopping cart is incredibly modular. There's a lot of modules involved which each contribute their small portion of info which makes up the entire info set for a product. It just isn't practical to trace across the hundres of files which comprise all the modules involved in the process.

 

I really need software to do this. My current solution is using WinMerge to compare text file backups between the two database states. It works, but is very slow because of all the manual labour involved.

Link to comment
Share on other sites

ah.....great magento, My best regards to you ( I know how much a pain in the a**  Magento is ).

 

And the easiest thing you can do is here is log all data written to the database, but since you are using Magento I really wouldn't recommend that as the relations in the database are extremely in-depth.

 

And if you are using 1.2 it should be very simple to export products.

 

And since Magento uses a complete Ajax interface it would be impossiable to profile the DB queries, unless you enable FirePHP for Zend :)

 

"And the easiest thing you can do is here is log all data written to the database"

 

^ How exactly would I do that? That's another method that will work too.

 

Anyone?

Link to comment
Share on other sites

Ah sorry I did not explain better :)

 

Yes, you will need root access to your server to setup the query logger, and this will qrite a log out for queries performed.

Because of magento's large database interaction I would recommend waiting to enable this feature until you are ready to insert the product.

 

Little Research.

 

If your running MySQL 5

 

http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html

 

this is all you will need ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.