Warning: mysql_connect (): Access denied for user "â € Žu1"?

It's extremely simple, and I apologize for asking such a rookie.

But I am getting this error:

Warning: mysql_connect(): Access denied for user '‎‎u1'@'172.16.3.139' (using password: YES) in /usr/local/pem/vhosts/103503/webspace/httpdocs/eirestudio-tools/crm/add-contact.php on line 53 

      

User says â € Žu1 ?

What does it mean?

Below is a connection example, please note the user why I am getting â € Žu1 ?

mysql_connect('localhost', '‎‎user', 'pass');

      

+2


source to share


1 answer


why am I getting â € â € Žu1?

You were only expecting "u1? Where are you reading this line from?"



What seems to happen is that you have some invisible control characters in your config source somewhere. Specifically, the string 'â € Ž is what you get when you take the Unicode U + 200E LEFT-TO-RIGHT MARK and encode it to UTF-8 and then read it using the Windows-1252 codepage.

This can happen if the username u1 was read from a text file: your program can read it as bytes in cp1252 (the default code page for western machines), but a text editor would assume it is UTF-8 and convert those bytes to characters U + 200E that you won't be able to see. I don't know where they came from, but you can try retyping / replacing the source containing "u1" to get rid of them.

+4


source







All Articles