How to Reset Joomla admin Password from MySQL command line

Wednesday, 19th June 2013

joomla logo how to reset admin password

It is very common thing for clients having Joomla based websites to forget their password. It is possible to reset password from jos_users table using PhpMyadmin. But it is much

# mysql -u root -p
Enter password:

Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 975975
Server version: 5.1.66-0+squeeze1 (Debian)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> USE joomla_site;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> UPDATE `jos_users` SET `password` = MD5( ‘new_password’ ) WHERE `jos_users`.`username` = “administrator” ;

Replace "new password", string with whatever new password is necessary
Change “administrator” or admin with joomla's admin username.

There you, go Joomla admin password is changed 🙂

Share this on:

Download PDFDownload PDF

Tags: , , , , , , ,

One Response to “How to Reset Joomla admin Password from MySQL command line”

  1. admin says:
    Google Chrome 27.0.1453.110 Google Chrome 27.0.1453.110 GNU/Linux x64 GNU/Linux x64
    Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36

    If above code doesn't work then its because of Joomla version or SQL version.

    SQL code for use with Joomla 2.5.x 3.1.x 

    INSERT INTO `jos_users`
    (`name`, `username`, `password`, `params`)
    VALUES ('Administrator2', 'admin2',
    'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
    INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`)

    SQL code for use with Joomla 1.5.xx

    INSERT INTO `jos_users`
    (`name`, `username`, `password`, `usertype`, `gid`, `params`)
    VALUES ('Administrator2', 'admin2',
    'Super Administrator', 25, '');
    INSERT INTO `jos_core_acl_aro`
    VALUES (NULL, 'users', LAST_INSERT_ID(), 0, 'Administrator2', 0);
    INSERT INTO `jos_core_acl_groups_aro_map`
    VALUES (25, '', LAST_INSERT_ID());

    – password = “this is the MD5 and salted hashed password”
    – admin = 433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT
    – secret = d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199
    – OU812 = 5e3128b27a2c1f8eb53689f511c4ca9e:J584KAEv9d8VKwRGhb8ve7GdKoG7isMm

    View CommentView Comment

Leave a Reply

CommentLuv badge