Solved: “You do not have sufficient permissions to access this page”

I have been locked out of my blog for weeks due to an obscure bug with WordPress and MySQL. Each time I attempted to access the admin side of WordPress I kept getting the following error message:

“You do not have sufficient permissions to access this page.”

I tried a million and one proposed solutions on the net, to no avail. It turns out this happened after an automatic upgrade of WordPress (from 3.0 to 3.0.1, I think) during which the installer attempted to upgrade the database tables. This is where I suspect things went awry. Here is the solution.

Table wp_usermeta is marked as crashed and last automatic repair failed

During one of my searches, I found out wp_usermeta was somehow corrupted. You can determine whether this is the case for you when clicking on the table on the left-hand side in PHPMyAdmin. You will see this message with no other explanation.

To solve this all you need to do is go back to the root page of your database by clicking it’s name on the sidebar. You will see a listing of all your tables. wp_usermeta will be listed and most likely will be showing a red bar with a message to the effect of “in use”.

Click the checkmark next to wp_usermeta and select “Repair” from the “With Selected:” drop-down.

Don’t ask me what repair does or how WordPress managed to screw up this way, I just hope this helps anyone out there finding themselves locked out over night.

Let me know!

Advertisements

7 thoughts on “Solved: “You do not have sufficient permissions to access this page”

  1. Cool. Fixed mine as well — didn’t even realize the problem until I saw those error messages in the apache error log. FYI: It’s pretty easy to do from a shell as well, in case you don’t have PhpMyAdmin installed. Log in with “mysql -u root -p”, supply the password, then type “use ;” and finally “repair table wp_usermeta;”. That did it for me 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s