May 26, 2012
tom

What privileges does a MySQL User need for WordPress?

Question

I need to create a new MySQL user to manage my wordpress site. What privellages are needed for wordpress?

I assume INSERT is also needed and maybe DROP?

Example

GRANT SELECT ON database.* TO user@'localhost';
Asked by Henry Hoggard

Answer

The official documentation says to give the user all privs. Others suggest that you can restrict it to

  • INSERT
  • UPDATE
  • DELETE
  • CREATE
  • DROP
  • ALTER
  • INDEX

Plugins etc can though call any statement they want so you would have to thoroughly test everything you install if you restrict privileges.

Answered by Iain

No related posts.

Leave a comment