How do I log into database after adding another user?

Hello friends. My wordpress db config was damaged and I lost the database username password. So I went to db schema and added another user localhost2 with password. Then rebooted the local app. The new user and password now appear in the backend of the app but when I try to login with the user name and password shown in the app I get the error.
Is there a db useer password stored soewhere in the plain text or is there a way to recover access to the database?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc


System Details

  • Local Version:

  • Operating System (OS) and OS version:


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hey @JD2024!

Try clicking on Site Folder > App > Public and then open your wp-config.php (I use Sublime text editor) and see what it shows in there for your DB settings

hi @Nick-B ,
Thank you so much for your reply. The problem started with me accidentally overwriting wp-config with some other data. So then I tried to go to database and changing the password for the user but rather than doing it I created another user and added it to the database. Again, something happened along the way and I got logged out of the database. And since the database credentials were shown in the app i tried to log in the openadminer to edit the database or at least back it up I couldn’t log in it. I used proper credentials but it just would give me an error. Then I noticed that local database was running on port 10004 and the address that was opening up when clicking on adminer app was on port 10006. I tried to connect to the database on port 10004 by changing the address in the address bar to 10004 but it gave me an unavailable page. I then connected to the database via terminal and was able export the wordpress database “local” and to verify that the database was intact and present. Then changed wp-config using the credentials in the app and was able to get my wordpress working again but i was not able to fix the openadminer page. So i made a backup and uninstalled and restored the wordpres… Back in business . Thank you for the attempt to help me. Much appreciated!

1 Like

Glad to hear you got back in @JD2024! Thank you for following up and sharing your resolution steps for others.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.