MySQL MariaDB password reset without knowing the password
-
Long story short I need to reset this password, it is production and I do have a backup of the environment.
Can someone assist with resetting the user password?
-
Do you have access to the root account to reset the user password or are you trying to reset the root password
-
I can login to the server as a root user, as for the db I'm not sure.
-
I'm not sure, but I want to say that a standard install of MariaDB allows for sudo manipulation / access from the local machine.... it's been a while and YMMV.
https://robbinespu.github.io/eng/2018/03/29/Reset_mariadb_root_password.html
^^ This should work from what I remember
-
Yeah it is really simple if you have root access. Use any of the results on the first page of "How to reset mysql password"
https://duckduckgo.com/?q=reset+mysql+admin+password&t=canonical&ia=web
-
Will give those a go and report back once I have a positive result.
Thanks!
-
In fact you dont even have to reset, you can just assume root access as root user without a password in most cases.
-
Short, short version.
update mysql.user set password=password('dumbpassword') where user='dumbuser';
-
You could use
sudo mysql -u root
-
Did you get it reset?
-
I was able to change the password, but it doesn't appear to allow the program to that uses this database to work.
What am I missing?
-
So I've been able to reset the root mysql user password, which is great, so now that's secured and functional. Now I just need to change the database user password and update the config file for said new password.
But to figure out how the password is hashed. . .
-
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
So I've been able to reset the root mysql user password, which is great, so now that's secured and functional. Now I just need to change the database user password and update the config file for said new password.
But to figure out how the password is hashed. . .
why, just change it on the system, do you need to enter the hashed password because there is no other way to change the application Database configurations?
-
@dbeato the system was setup as a demo and was moved to production. The person who set up the environment is no longer and I'm just trying to close any holes that may exist.
The system isn't super critical, but it would be nice to have all of this aligned.
-
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
@dbeato the system was setup as a demo and was moved to production. The person who set up the environment is no longer and I'm just trying to close any holes that may exist.
The system isn't super critical, but it would be nice to have all of this aligned.
is this the demo you mentioned a while ago on a rant?
-
@dbeato said in MySQL MariaDB password reset without knowing the password:
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
@dbeato the system was setup as a demo and was moved to production. The person who set up the environment is no longer and I'm just trying to close any holes that may exist.
The system isn't super critical, but it would be nice to have all of this aligned.
is this the demo you mentioned a while ago on a rant?
Not recalling which rant in particular, you'd have to remind me. But I don't think so.
-
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
@dbeato said in MySQL MariaDB password reset without knowing the password:
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
@dbeato the system was setup as a demo and was moved to production. The person who set up the environment is no longer and I'm just trying to close any holes that may exist.
The system isn't super critical, but it would be nice to have all of this aligned.
is this the demo you mentioned a while ago on a rant?
Not recalling which rant in particular, you'd have to remind me. But I don't think so.
This one
https://mangolassi.it/topic/1022/what-are-you-doing-right-now/69963 -
@dbeato said in MySQL MariaDB password reset without knowing the password:
Not recalling which rant in particular, you'd have to remind me. But I don't think so.
That's from months ago, not nearly recent, and that was an ESXi/Dell issue I was ranting about.
-
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
So I've been able to reset the root mysql user password, which is great, so now that's secured and functional. Now I just need to change the database user password and update the config file for said new password.
But to figure out how the password is hashed. . .
That should be easy as above... Change the DB user's password, and then update the config file in the application to use the right password.
Did that not work?
-
@dafyre said in MySQL MariaDB password reset without knowing the password:
@DustinB3403 said in MySQL MariaDB password reset without knowing the password:
So I've been able to reset the root mysql user password, which is great, so now that's secured and functional. Now I just need to change the database user password and update the config file for said new password.
But to figure out how the password is hashed. . .
That should be easy as above... Change the DB user's password, and then update the config file in the application to use the right password.
Did that not work?
It didn't because the config file has the password hashed, so I'm looking into how that is hashed from the dev so I can update it there.
I think this topic is closed just need to figure out the program side config file.