UPWORK/ODESK guru: Tips and Tricks for clients

skype: upwork.link , email: info@upwork.link

How to Add an Admin User to the WordPress Database via MySQL

without comments

SQL queries:

INSERT INTO `databasename`.`PREFIXusers` (`ID`, `user_login`, `user_pass`, `user_nicename`,
`user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`)
VALUES ('4', 'OIam', MD5('OIam'), 'Odesk Iam', 'info@odesk.by', 'http://odesk.by',
'2014-06-06 00:00:00', '', '0', 'Odesk Iam');
INSERT INTO `databasename`.`PREFIXusermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES
(NULL, '4', 'PREFIXcapabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `databasename`.`PREFIXusermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES
(NULL, '4', 'PREFIXuser_level', '10');

Written by spectre

June 6th, 2014 at 9:54 pm

Posted in Mysql

Leave a Reply

*