WordPress – add a new admin user directly using database

# Replace the following:
# <DATABASE NAME>
# <WP TABLE PREFIX> = "wp_"

INSERT INTO `<DATABASE NAME>`.`<WP TABLE PREFIX>users` (`user_login`, `user_pass`, `user_email`, `user_registered`) VALUES ('new_admin', MD5('123456'), 'new_admin@test.com', NOW());

# Get the user id of the use
# Replace <ADDED USER ID>
INSERT INTO `<DATABASE NAME>`.`<WP TABLE PREFIX>usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '<ADDED USER ID>', '<WP TABLE PREFIX>capabilities', 'a:1:{s:13:"administrator";b:1;}');

INSERT INTO `<DATABASE NAME>`.`<WP TABLE PREFIX>usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '<ADDED USER ID>', '<WP TABLE PREFIX>user_level', '10');