MySQL command to reset(change) Joomla admin(administrator) password.

If you are here just to copy and paste the command for Joomla password reset, please scroll a little bit.

If you re not so experienced user landed here you may consider changing your Joomla’ password using PHP MyAdmin.
For those who are fine with SSH and MySQL commands you can continue with this tutorial.

If the case is that you are not so literal with SSH, MySQL, the command line at all, and you do not have installed or option to install PHP MyAdmin, you may find this tutorial: Access your server via SSH with Putty – useful.

First connect your MySQL database server. Usually this can be done trough the command line with this:


  1. server# mysql -hYour_database_server_address -uYour_database_username -p
  2. Enter password:********
  3. Welcome to the MySQL monitor.  Commands end with ; or \g.
  4. Your MySQL connection id is 7342665 to server version: 4.1.22-standard
  5.  
  6. Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
  7.  
  8. mysql>

Now you can execute the following MySQL command to change Joomla admin password:

  1. UPDATE `jos_users` SET `password` = MD5( 'new_password' ) WHERE `jos_users`.`username` = "admin" ;

Change the string ‘anynewpassword’ with the new Joomla password, also if your administrator account was created with different user, do not forget to change ‘admin’ as well.

There is no need to do anything else like flushing database for example, but directly you may try your Joomla’s login with the new password.

For those who read my tutorial to the end I will provide a nice hint.
Lets say that you need the Joomla password changed just for a while – the owner of the site forget to provide it to you, or the person that is working on this project is not reachable.

Then list all the Joomla users with this MySQL command

  1. mysql> SELECT * FROM jos_users;

This will pull up a listing with users and passwords. Just locate the ‘admin’ username and copy the password which probably looks something like this: 1Adsjkalheut67843sad
Keep that password in a text file and when you finish your work you can update the ‘admin’ again, but using the MySQL line like this:

  1. UPDATE `jos_users` SET `password` = "1Adsjkalheut67843sad" WHERE `jos_users`.`username` = "admin" ;

Hope you got it. Thank you for reading this Joomla password reset tutorial. Cheers!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)

Tags

Filed Under: Joomla

Anthony Gee About the Author: Anthony Gee is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply