How to find DB_NAME, USER and PASSWORD

Posted January 29, 2017 2.6k views
WordPressUbuntu 16.04


I accidentally overwrite “wp-config” on my Wordpress installation with the “wp-config” of my local installation. I don’t have a backup of this “wp-config”… So my question is : how can I find the name of the database, the username and the password?

And what about the authentication Unique Keys and Salts?

Should I do a fresh installation of my wordpress?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


I would recommend logging into your MySQL instance and looking up for your database:


If you have a descriptive name it would be easier for you to find the database.

Once you have your database name, you could either try to do the same for your user, or create a new user instead:


by Etel Sverdlov
MySQL is a powerful database management system used for organizing and retrieving data. This tutorial explains how to to create new MySQL users and how to grant them the appropriate permissions.