Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Using $ in MySQL password fails


2 Posts   1647 Views

Kevin Dean

29 September 2007 at 6:06am 1 Post

Using SVN (Pulled 17:30 28 Sept 2007 GMT) and 2.1.0-rc releases, I've discovered that using the $ symbol in a MySQL password causes the install to fail.

Errors indicated that (despite passing the first stage check) the password was not being submitted when mysql_connect was being called.

xera1 on #silverstripe recommended changing the following (line 591 in install.php):

   "password" => "{$config['mysql']['password']}",


   "password" => '{$config['mysql']['password']}',

This corrected the problem.


29 September 2007 at 8:09am Core Development Team, 84 Posts

Thanks for that hint Kevin - the reason for it is that inside "double-quoted strings", PHP assumes the $ sign precedes a variable name, so will try to find that variable name and substitute it in. Inside 'single-quoted strings', it will treat the $ sign as a literal $ sign, and not substitute it with anything.