2

I'd like to send my Drupal installation to a colleague, but I don't want him to see the username and the password of my database. Where are these informations stored?

I've seen that the username and the password are written in sitename/sites/default/settings.php, but is it the only file with these informations? Is it sufficient if I change the username and the password in this file and then send my colleague all my Drupal files and my database?

1

IMO both previous answers (posted with 10 secs difference ...) are incomplete ...

The /sites/default/settings.php file indeed does contain that userid and password, and if you "don't want him to see the username and the password of my database" (as in your question), then you at a minimum remove that userid and password (which you want to keep secret) in that file.

However, your question also contains this:

Is it sufficient if I change the username and the password in this file?

To keep your userid and password secret you are done with only this change. But if you want your colleague to be able to actually use the Drupal installation you want to send, then IMO the answer to that question is NO. Because Drupal requires that the /sites/default/settings.php file that your colleague will be using contains the userid and password that matches with the database after it is restored by your colleague.

Note (credits: sanzante): you should also send your colleague a database dump. And your colleague only has to import the database and edit the settings.php and add the user and password for the imported database. That config (user and password) is not dumped in the database so the colleague must have his/her own.

  • 1
    Yes, he also should send him a database dump and his colleague only has to import the database and edit the settings.php and add the user and pass for the importad database. That config (user and pass) is not dumped in the database so the collegaue must have their own. – sanzante Jan 13 '17 at 12:22
  • 1
    @sanzante : merci! You agree I include your comment in my answer also? – Pierre.Vriens Jan 13 '17 at 12:26
  • Yes, I agree, no problem at all! – sanzante Jan 13 '17 at 12:29
  • 1
    @Pierre.Vriens and sanzante you both are right. Actually we miss some points :) – DRUPWAY Jan 13 '17 at 12:42
  • 1
    No no, As I believe true is always true. I saw lots of your answer. Its always more details and descriptive. Which is easy to understand. Its great as usual. – DRUPWAY Jan 13 '17 at 13:06
3

The settings are stored in sites/default/settings.php. That is indeed the only file with that information and it is sufficient that you change the username and the password in that file.

3

In a single word "YES". Is sufficient if I change the username and the password in sitename/sites/default/settings.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.