R
Railway12mo ago
ocosta

root password MySQL

Hey guys, I'm using the MySQL database and I changed the root password. I didn't mean to do it. Is there a way to find out the root password?
14 Replies
Percy
Percy12mo ago
Project ID: N/A
Fragly
Fragly12mo ago
Where'd you change it?
ocosta
ocosta12mo ago
I changed in the environment variables, in the MYSQL_ROOT_PASSWORD
Fragly
Fragly12mo ago
Pretty sure it'll still work fine You can just use the password you changed it to
ocosta
ocosta12mo ago
I didn't change the root password, I tried to connect with another user I created and forgot to write down the root password, now I don't know it anymore.
Fragly
Fragly12mo ago
oh, you can find the root password in the variables of your service
Fragly
Fragly12mo ago
No description
ocosta
ocosta12mo ago
I edited there by mistake lol
Fragly
Fragly12mo ago
yea I'm pretty sure that's fine
ocosta
ocosta12mo ago
That's why I can't connect anymore
Fragly
Fragly12mo ago
even when you use the password that you changed it to?
ocosta
ocosta12mo ago
yeah
Fragly
Fragly12mo ago
If the data is important then I think you can do the following to reset your MySQL settings: 1. Add a new MySQL deployment 2. Remove the previous MySQL deployment, leaving the volume containing the data behind 3. Delete the volume from the new MySQL deployment 4. Attach the old volume to the new volumeless MySQL deployment 5. Redeploy WARNING: I haven't tested this in production environment to see if the data is maintained, I super recommend you wait for someone smarter than I am to pitch in, there is probably a better way to do this
ocosta
ocosta12mo ago
thanks a lot man
Want results from more Discord servers?
Add your server