Can't log in with MySQL username containing "á" #12232
Comments
By the way, |
This is caused by client charset being set to something else that utf-8. The problem is that there is no way in PHP to set charset before authenticating. So PHP is sending utf-8 encoded string, while MySQL parses it as iso-8859-1 (what is usually the default). Also see http://php.net/manual/en/mysqli.real-connect.php#refsect1-mysqli.real-connect-notes So I think the only way to allow authentication with non ascii usernames (or passwords) is to change server default charset to utf-8. |
Thanks for figuring that out. So this is really a MySQL configuration issue and there's nothing we can do about it. But I wonder why the command line client works, then. I'm not even sure that this is worth adding a FAQ entry about at this point. What do you think? |
I'm not sure either. I assume you have found this while solving question of some user, right? |
Correct, although I believe discovering this was a side-effect of their actual problem, rather than the problem itself. If there's nothing to be done in the code, I think it's best to write a FAQ about it and move on. |
Do you mind reviewing #12284 for accuracy? |
Did you find a solution for this problem? I am facing it right now. I don't know if phpmyadmin is considering this letter English Language or not. |
Steps to reproduce
á
character (mine is simply calledá
without any other characters)Expected behaviour
I should be logged in successfully
Actual behaviour
I am shown the error message
Server configuration
Operating system:
Debian Linux
Web server:
Apache 2.4.10
Database:
MySQL 5.5.49
PHP version:
5.6.20
phpMyAdmin version:
4.7.0-dev; git revision 5a4af02
Client library
libmysql - 5.5.49
Client configuration
Browser:
Firefox 46.0.2
Operating system:
Mac OS X
The text was updated successfully, but these errors were encountered: