WordPress Error - Sorry, you are not allowed to access this page
I migrated one of my site to DigitalOcean and during the process, I changed the table prefix from wp_ to wpdo_. The site loaded fine but when I tried to access wp-admin, I got the following error:
Sorry, you are not allowed to access this page
I checked the local install to find what could have gone wrong. Since the issue was related to login, I narrowed my thoughts on wpdo_user, wpdo_usermeta and wpdo_options tables.
A quick search in wpdo_usermeta and wpdo_options revealed a few entries pointing to the old prefix
select meta_key from wpdo_usermeta where meta_key like "wp_%";
select option_name from wpdo_options where option_name like "wp_%";
I modified the entries and was able to access wp-admin