0

I've created a development copy of one of my Magento sites so I can do a test upgrade on it.

When you try to add something to the cart I get this error message

SQLSTATE[42000]: Syntax error or access violation: 1142 TRIGGER command denied to user oldusername@localhost'

It gives the old username in the error message but I have changed all these details within app/etc/local.xml

I've cleaned all the cache and turned it off and wiped all session data too but I still get the same error.

Ive done a grep -ir oldusername on the entire Magento file system but cant find any reference to the old details and also searched the database but cant find anything.

Ive also cleared all cookies and cache from my browser and tried on a fresh browser too but get the same error.

Is there anywhere else that the database connection details are stored other than local.xml?

1 Answer 1

1

The problem is not on filesystem, but in database. According to the error there is some TRIGGER configured in your database to run under old SQL username. You can see all triggers with show triggers SQL command in SQL console or phpMyAdmin.

By default, there should be no any triggers configured in Magento. May be some third-party extension added triggers. Also, there is a very high change that the store was compromised, as often, triggers used to add malicious code in header/footer (i.e. javascript includes).

1
  • Thanks! I can see it now, there was an entry from a third party checkout plugin made by Klarna payment processor which included the old details. Ive never come across these triggers before so was confusing as they didnt show up on a regular search Oct 29, 2019 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.