I switched to the HEAD version after discovering that passwords were not being unescaped properly. While passwords (and presumably usernames) are properly being unescaped now, there is an additional problem. If the password has an @ character in it, drush does not properly separate the password from the hostname, resulting in a SQL error.

SQLSTATE[HY000] [2005] Unknown MySQL server host 'ssword@localhost' (1) [warning]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a
configured database.

Drush was attempting to connect to :
Drupal Root : /var/www/html/drupal
Drupal version : 6.11
Site Path : sites/example.com
Site URI : http://example.com
Database Driver : mysqli
Database Hostname : ssword@localhost
Database Username : myuser
Database Name : mydb
Database Password : myp

You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command
line or $options['uri'] in your drushrc.php file.

In the above example, the password is actually myp@ssword. I have attached a patch that resolves this.

CommentFileSizeAuthor
drush-env-fix.patch687 bytesXenoPhage

Comments

moshe weitzman’s picture

Status: Active » Fixed

Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.