From: http://www.dnawebagency.com/how-to-add-an-admin-user-to-wordpress-database/
Editing the wp_users table
We will need to insert a row into the database with our admin users information. Click on the “Insert” tab in order to bring up the phpMyAdmin insert form. Insert the following information:
- user_login – this is the username you want to use to access WordPress
- user_pass – this is the password you want to use to access WordPress (be sure to select MD5 from the phpMyAdmin Function menu – WordPress stores passwords with MD5 encryption)
- user_nicename – put whatever you would like to refer to yourself as in here (not your username)
- user_email – this is the email account associated with this user
- user_url – the url to your website like – http://www.dnawebagency.com
- user_registered – when was this user registered – just select a date with the date selector
- user_activation_key – you can leave this blank
- user_status – leave this set to 0
- display_name – usually I set this to whatever my user_nicename is
Ok now that you have got all of that information entered you will need to hit the “Go” button at the bottom of the phpMyAdmin window. You should be redirected to a page that shows the results of your query. If there are no errors continue with editing the wp_usermeta table.
Editing the wp_usermeta table
So now that we have inserted our user we will need to give it privileges to access the WordPress Admin seciton. This is done through the wp_usermeta table. You will need to know the id of the user you just created. If you don’t know the id now would be a good time to check the wp_users table for it. We will need to insert two rows into the wp_usermeta table, wp_capabilities and wp_user_level. Here are the steps you will need to follow to give your user privileges.
- Click on the wp_usermeta table to bring up the entries.
- Click on the “Insert” tab to insert a new row.
- Fill in the following information
- umeta_id – leave this blank it is automatically generated
- user_id – this is the id of the user you created in the previous steps
- meta_key – for this step insert wp_capabilities
- meta_value – insert exactly this –
a:1:{s:13:"administrator";b:1;}
- Insert another row with this information
- umeta_id – leave this blank it is automatically generated
- user_id – this is the id of the user you created in the previous steps
- meta_key – for this step insert wp_user_level
- meta_value – insert 10
- Click the “Go” button in phpMyAdmin to insert the row.
Now you should be able to login to your wp-admin page with the username and password you specified for this user. After logged in I would visit the Users section within WordPress, click edit on the user I just added, and click the Update Profile button at the bottom of the screen. This will allow WordPress to go through and add some more information and “clean up” the user we just added.
That’s it – if you have issues visit our support page to learn how to receive support.
The following link worked the last time I tried it.
https://www.inmotionhosting.com/support/edu/wordpress/333-add-admin-via-mysql