2

As far as I know, it's usually considered a good practice when developing websites to store in website config DB credentials of the user without ALTER/DROP permissions (so user may only select, insert, delete rows, but cannot modify DB structure).

But nowadays more and more sites using Docker for deployment and usually DB images like mysql:latest grant all permissions for the given database to the given user.

So my question is - should I manually go to MySQL DB as root during deployment and restrict the permissions or should I just keep it as is?

1 Answer 1

0

Given a brutal super user command or DROP TABLE / DROP DATABASE as likely to be the SQL injection commands for the malicious hacker, you may as well defend yourself against those. No point invoking a data recovery procedure pre-emptively.

Your Answer

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

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