Reset Admin Password

midder wrote on Monday, November 16, 2009:

Hello

I have forgotten the admin password of the system. Is there a script I can run in the database to reset the password?

Thanks
Brian

sunsetsystems wrote on Monday, November 16, 2009:

Try this query:

update users set password = ‘1a1dc91c907325c69271ddf0c944bc72’ where username = ‘admin’;

This should reset it to “pass”.

Rod 
(http://www.sunsetsystems.com/)

midder wrote on Monday, November 16, 2009:

Perfect. Thank you Rod.

medsupporter wrote on Wednesday, October 13, 2010:

Hello!
I have a similar question…. I am about to change my MySQL root password for security, but I figure I need to update this entry in OpenEMR somewhere…. I can’t seem to find that location.  Can you please point me in the right direction?
Thank you,
Tom

bradymiller wrote on Thursday, October 14, 2010:

hey,
The mysql root password is only needed during installation of OpenEMR (in order to create the initial OpenEMR database); changing the mysql rtoot password will have no affect on a current installation.
-brady

medsupporter wrote on Thursday, October 14, 2010:

Thank you Brady!   What credietials does OpenEMR use to connect to MySQL durring opperations?? Just the fact that it’s localhost?
THANKS,
Tom

bradymiller wrote on Thursday, October 14, 2010:

hi,
It uses an openemr specific mysql user (this is created on installation). Specific user credentials and settings can be found in the library/sqlconf.php file. Note if your using a more recent development version, this file is now at /sites/default/sqlconf.php
-brady

medsupporter wrote on Thursday, October 14, 2010:

Thank you Brady.  I noticed this and was a bit confused… is this the password with the clever “3’s” in it?
I would think that by default this should probably be a user configured value such that every instance of openemr isn’t the same?
Does it make sense for me to change this, and if so, do I simple edit the values in the sqlconfg.php file and then somewhere within MySQL?
THANK YOU!
Tom

bradymiller wrote on Thursday, October 14, 2010:

hey,

The setting of the OpenEMR specific mysql user actually depends on the installation. In the windows-xampp package and the OpenEMR Appliance it is already set (I’m guessing your using the xampp-windows package if have the 3’s in it). In the ubuntu packages, it is randomly created. In a manual install (using setup.php script), the user can select it.

To change it, you’re correct. Simply need to change the password in mysql and in sqlconfig.php.

-brady

medsupporter wrote on Thursday, October 14, 2010:

Right you are!  XAMPP is was.  I’ll give changing it a try.  Thank you very much for the help!
Tom