R
Railway11mo 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
Percy11mo ago
Project ID: N/A
Fragly
Fragly11mo ago
Where'd you change it?
ocosta
ocosta11mo ago
I changed in the environment variables, in the MYSQL_ROOT_PASSWORD
Fragly
Fragly11mo ago
Pretty sure it'll still work fine You can just use the password you changed it to
ocosta
ocosta11mo 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
Fragly11mo ago
oh, you can find the root password in the variables of your service
Fragly
Fragly11mo ago
No description
ocosta
ocosta11mo ago
I edited there by mistake lol
Fragly
Fragly11mo ago
yea I'm pretty sure that's fine
ocosta
ocosta11mo ago
That's why I can't connect anymore
Fragly
Fragly11mo ago
even when you use the password that you changed it to?
ocosta
ocosta11mo ago
yeah
Fragly
Fragly11mo 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
ocosta11mo ago
thanks a lot man
Want results from more Discord servers?
Add your server