1

I am attempting to add an admin user to our website, and none of the credentials work. My goal is to add an adminstrator by creating a query, and mostly all websites I have found are for wordpresses.

My prefix is "cal_users", not "wp_users". I need help, and if someone were to give me the code to copy and paste for the query that would be wonderful. I am using phpmyadmin.

Rohit Gupta
  • 4,022
  • 20
  • 31
  • 41
  • Welcome to StackOverflow Chase! Please review http://stackoverflow.com/help/how-to-ask for tips on crafting a good question. In this case you should be more specific about what you've tried and how it isn't working. – eebbesen Sep 10 '15 at 21:49

2 Answers2

1

it must be something like this

update 'cal_usermeta' 
set meta_value='a:1:{s:13:"administrator";b:1;}', meta_value='10' 
where meta_key='wp_capabilities' 
and meta_key='wp_user_level' 
and user_id='[ID from cal_user]';

remember to change the userID

-1

copy and paste this

update cal_usermeta set meta_value='a:1:{s:13:"administrator";b:1;}', meta_value='10' where meta_key='wp_capabilities' and meta_key='wp_user_level' and user_id='2';