Bug #1422 Passwords containing the character "$" fails authentication when connecting.
Submitted: 28 Sep 2003 18:51 Modified: 29 Sep 2003 2:30
Reporter: Danny Webster Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:3.23.54 OS:Linux (Linux, Red Hat 9.0)
Assigned to: CPU Architecture:Any

[28 Sep 2003 18:51] Danny Webster
Description:
When choosing a password for a user, if the "$" character is used, the database is unreachable when using a mysql_connect($host, $user, $password); command.  Only a mysql_connect('localhost', 'root', 'goof$ball'); command will permit access to the database.

How to repeat:
When setting a password for a user, make use of the "$" character.  Attempt to connect via a php statement employing variables and connection will be denied.

Suggested fix:
Alter the way the password string is processed when passed via a variable to match the way a password literal is processed.
[29 Sep 2003 2:30] Georg Richter
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem is not the result of a bug.
For a list of more appropriate places to ask for help using MySQL
products, please visit http://www.mysql.com/support/

Thank you for your interest in MySQL.

Please note the diffrence between: 
 
$passwd = 'golf$ball'    (golf$ball) 
$passwd = "golf$ball"   (golf) if $ball is empty or unassigned 
 
If this doesn't fix your problem please open a new bug report on http://bugs.php.net with a short 
repeatable testcase/script.