0

Just to be sure, which solution is better when I export / import DB ?

  • just exclude Users table from my dump export ?
  • keep exporting users table but exclude users table content from my dump export ?

Because I would to to have different access code between production and developpment websites. Thanks

EDIT: to @sanzante just a test on a dev website, and I get an error:

drush @pfdevd6mg sql-sanitize --sanitize-password=newpassword
PHP Warning:  Module 'curl' already loaded in Unknown on line 0

The following operations will be done on the target database:
 * Reset passwords and email addresses in users table
 * Truncate Drupal's sessions table

Do you really want to sanitize the current database? (y/n): y
Sanitize query failed.

does alias aren't possible ?

closed as unclear what you're asking by Jaypan, DRUPWAY, Pierre.Vriens, mradcliffe, Neograph734 Mar 7 '17 at 15:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • The drush problem is a new question, please create a new one. It seems there's some problem with your drush or PHP installation. – sanzante Mar 7 '17 at 10:30
1

If your only concern is to have different passwords you can use drush sanitize to change all passwords afer importing the DB into dev environment.

drush sql-sanitize --sanitize-password=devpassword

This changes all users password to 'devpassword'.

The command also sanitizes all user emails (so your dev site will never send mails to real users).

  • great, I didn't knew this command...so the user stay the same and only password will change ? – webmaster pf Mar 7 '17 at 9:35
  • Only the user password and the user email are changed, other data remains the same. – sanzante Mar 7 '17 at 9:37

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