Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i set up a dedicaced server with a tutorial.

I set in PHP :

mbstring.language=UTF-8 
mbstring.internal_encoding=UTF-8 
mbstring.http_input=UTF-8 
mbstring.http_output=UTF-8 
mbstring.detect_order=auto

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

3 Answers 3

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:

"Pa$$word"

won't work, while

"Pa\$\$word"

and

'Pa$$word'

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: http://www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime. Phpmyadmin will able to support for passwords contains $. & also use recent versions of PMA.

share|improve this answer

Your Answer

 
discard

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.