PDOStatement: SUPER privilege?

by AlexB, (3879 days ago) @ jernst

Depending on mysql version, even the user executing the trigger does need SUPER privileges...

This is what I did (somewhat kludgy, but I'm no expert on this):

  • I gave my selfoss mysql user SUPER privileges to run the database update, and revoked them afterwards.
  • exported the triggers with something like mysqldump --triggers --no-create-info --no-data --no-create-db --skip-opt selfoss > selfoss.trigger
  • deleted the triggers from the selfoss database: drop trigger insert_updatetime_trigger; and drop trigger update_updatetime_trigger;
  • replaced the selfoss user in the exported selfoss.trigger file with root (DEFINER=`root`@`localhost`)
  • mysql selfoss < selfoss.trigger

So I now have the triggers running as root, but selfoss accesses the database with an unprivileged user.


Complete thread:

 RSS Feed of thread