How to add new admin Joomla user via mysql command line

Update prefix to your own

INSERT INTO `js_users` (`name`, `username`, `password`, `params`, `registerDate`, `lastvisitDate`, `lastResetTime`) VALUES ('Administrator2', 'admin2', 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '', NOW(), NOW(), NOW());

INSERT INTO `js_user_usergroup_map` (`user_id`,`group_id`) VALUES (LAST_INSERT_ID(),'8');

You now should be able to login your dashboard with the following credentials:

Username: admin2
Password: secret

You will have to reset these credentials once you logged in your dashboard as its not secure to have it


Source: the rest