Forgot mysql password

54 views
Skip to first unread message

sammy ongaya

unread,
Mar 20, 2015, 2:32:45 AM3/20/15
to openmr...@googlegroups.com
Hi, is there a way I can recover my mysql login password if I forget?

Antony Ojwang'

unread,
Mar 20, 2015, 2:43:20 AM3/20/15
to openmr...@googlegroups.com
Run this against your database:
update users set salt='852f59ddefd9865845aa0c7c1c8a022106feb278c758d66041f3f334f89732dfcf08eabb9eacc69a5b20fe698c7dc536f30403e879f89844f1ee97681af88081', password = 'c7357e9eba5760693f06d4a9c711445cb0d6e1a38dc3737aa1a2f499eeef3518f05e3c3e6327e16192f8872bfe424db0334eb74f411f397d5de731b7d2a72b5b', retired=0 where system_id='admin';

This will restore your password to Admin123

On Fri, Mar 20, 2015 at 9:32 AM, sammy ongaya <sammi...@gmail.com> wrote:
Hi, is there a way I can recover my mysql login password if I forget?

--
You received this message because you are subscribed to the Google Groups "OPENMRS KENYA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmrs-keny...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Antony Ojwang'

unread,
Mar 20, 2015, 3:27:02 AM3/20/15
to openmr...@googlegroups.com
My answer might be wrong. I assumed you asked about resetting password for openmrs. If you want to correct one for mysql, assuming your username is root, use the following:

alter table mysql.user set password = PASSWORD('yourNewPassword') where user='root';

Please let us know if this one works

collins olando

unread,
Mar 21, 2015, 4:07:18 PM3/21/15
to openmr...@googlegroups.com

Pleas note, Incase during installation of the openmrs database, you allowed installation of test data,  then the password for admin is overwritten to "test"

Hillary kavagi

unread,
Mar 23, 2015, 8:56:16 AM3/23/15
to openmr...@googlegroups.com
Hi Antony, your solution works
Regards
Hillary
Reply all
Reply to author
Forward
0 new messages