Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't log in with MySQL username containing "á" #12232

Closed
ibennetch opened this issue May 5, 2016 · 7 comments
Closed

Can't log in with MySQL username containing "á" #12232

ibennetch opened this issue May 5, 2016 · 7 comments
Assignees
Labels
Bug A problem or regression with an existing feature
Milestone

Comments

@ibennetch
Copy link
Member

Steps to reproduce

  1. Create a user containing the á character (mine is simply called á without any other characters)
  2. Log out and attempt to log in as that user

Expected behaviour

I should be logged in successfully

Actual behaviour

I am shown the error message

mysqli_real_connect(): (28000/1045): Access denied for user 'á'@'localhost' (using password: YES)

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

@ibennetch
Copy link
Member Author

By the way, mysql -u á -p works correctly.

@nijel nijel added the Bug A problem or regression with an existing feature label May 11, 2016
@nijel nijel added this to the 4.6.2 milestone May 23, 2016
@nijel nijel self-assigned this May 23, 2016
@nijel nijel removed this from the 4.6.2 milestone May 23, 2016
@nijel
Copy link
Contributor

nijel commented May 23, 2016

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.

@ibennetch
Copy link
Member Author

ibennetch commented May 28, 2016

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?

@nijel
Copy link
Contributor

nijel commented May 30, 2016

I'm not sure either. I assume you have found this while solving question of some user, right?

@ibennetch
Copy link
Member Author

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.

@ibennetch ibennetch assigned ibennetch and unassigned nijel May 30, 2016
@ibennetch
Copy link
Member Author

Do you mind reviewing #12284 for accuracy?

@nijel nijel added this to the 4.7.0 milestone Jun 3, 2016
@nijel nijel closed this as completed in c993509 Jun 3, 2016
@Aboelfotoh83
Copy link

Aboelfotoh83 commented Nov 7, 2019

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants