MySQL Database User: Which Privileges are needed?

The short installation instruction for WordPress (“5 Minutes”) state that:

Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.

While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me:

  • Data: SELECT, INSERT, UPDATE, DELETE
  • Definition: CREATE, ALTER, DROP
  • Extra: INDEX
  • More:

    1. LOCK TABLES
    2. REFERENCES
    3. CREATE TEMPORARY TABLES
    4. CREATE VIEW
    5. SHOW VIEW
    6. CREATE ROUTINE
    7. EXECUTE
    8. ALTER ROUTINE

I’m pretty sure for the first three groups, I named them Data, Definition and Extra here. But what about the others below the More entry? Normally I would say, those are not needed, but I would like to get a second opinion.

5

The others are not needed as you point out.

Btw, what you could do is, conditionally set the user/pass based on the requested page. As in unprivileged with select/insert/update/delete for normal usage, and privileged with definition/index related stuff in addition when visiting the upgrade page.

Leave a Comment