Question:
I’ve forgot my WordPress database password. How can I get it back.
Answer:
WordPress stores your database password in wp-config.php. Open up this file and you should find it near the top.
Note that this is your database password and not your wordpress admin/username password. The password in wp-config.php is the password wordpress uses to connect to your database server.