Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i set up a dedicaced server with a tutorial.

I set in PHP :


But each time there is a $ in the password (i have one for the root of mysql + other script) the password won't work.

For example, I just removed the $ in the password for a script, and it worked.

When i connect @root on mysql via phpmyadmin : don't work When i connect @root via PHP : works

What can i do for this problem please ?

PS: my password works when i connect mysql via the console

share|improve this question
up vote 1 down vote accepted

Ok, problem found, only happens on firefox. I clean up all cache + cookies. Problem solved.

Weird. But solved. Thanks all ;)

share|improve this answer

$ in PHP has a special meaning, you should escape it if used in double quotes (") strings. Or you should use single quoted (') strings:


won't work, while




will work.

share|improve this answer
but i can't escape the password in the interface of PHPMYADMIN when he ask me my password. How can i fix that ? – Tristan May 24 '10 at 12:55
@Tristan does it works when you connect via console? as in "mysql -u root -p" ? – Mr Shunz May 24 '10 at 13:02
yes it works, i've just tested – Tristan May 24 '10 at 13:06
#1045 - Acc�s refus� pour l'utilisateur: 'root'@'@localhost' (using password: No) IT's what phpmyadmin outputs. ("accès refusé : means access denied) – Tristan May 24 '10 at 13:11
@Tristan seems a problem with the configuration of phpmyadmin, as it says "using password: No". Try go back to the setup page and check the authentication options. – Mr Shunz May 24 '10 at 13:16

In your php configuration, set to vice versa of magic-quotes-runtime variable. here is more info: Phpmyadmin will able to support for passwords contains $. & also use recent versions of PMA.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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