0

This question already has an answer here:

While installing WP, I created a mysql user to access only the relevant WP database. It's likely that not technical people will end up with access to this account, so I decided to remove DELETE and DROP privileges from this user.

Was this a bad idea? Will anything in WP not function correctly because of this.

Thus far, I got a couple of error messages during the install, but I looked up what they were doing, and that was precisely nothing. The DROP queries didn't match anything they would have dropped.

UPDATE: It seems that my question is addressed by answers in this question: MySQL Database User: Which Privileges are needed?

marked as duplicate by Pieter Goosen, Nicolai, Johannes Pille, fuxia Aug 16 '14 at 0:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

WordPress absolutely does need "DELETE", otherwise it has no way to delete posts or tags or options rows or anything else.

The "DROP" command is sometimes used during upgrades, although it's been a long time. The last time I think it was used was during the WordPress 2.3 update, which removed the assorted categories tables in favor of the new taxonomy tables. I would not say it is safe to remove it, but I doubt it would cause you any real problems for now. A solid backup plan in place is a better idea than removing it. Frankly, if something gets to the point where they can run raw SQL commands on your system, you're already in trouble, denying DROP won't help much.

Plugins will occasionally create their own tables and do things like this. DROP is pretty rare though, except during a plugin uninstall process.

  • Yes, backups are the way to go for securing information, but it's a lot of work restoring data; especially without potentially overwriting the data created since the last backup. I think I will leave DELETE out for the first couple of weeks and make my non tech-heads think a little bit more before deleteing anything. – Gn13l Aug 15 '14 at 15:15
  • No, this is an incredibly bad idea. WordPress needs the ability to delete things. If I add a "tag" to a post and then remove it, then WordPress won't be able to remove it without having DELETE. Auto-draft posts cannot be removed without DELETE. Transients are temporary options with a timeout that are stored in the database by default, and they need DELETE to timeout properly. You need to grant the DELETE permission or weird stuff will happen. – Otto Aug 15 '14 at 18:55
  • Ok, I added DELETE to the user privileges. – Gn13l Aug 15 '14 at 19:44
0

The WordPress installation instructions at http://codex.wordpress.org/Installing_WordPress#Famous_5-Minute_Install just say "Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it." (emphasis mine)

However, my experience has been that only CREATE, ALTER, INSERT, UPDATE, and SELECT are actually used.

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