Why does mysql allow me to enter password for non existing mysql user My mysql server has 2 users - 

root
robb


But when I try to login with another user it let's me enter password -

hussain@magic-laptop:~$ mysql -u jon -p
Enter password:


Shouldn't it give an error saying user: jon donesn't exist?
I'm sure someone else will be able to provide a more informed answer than this, but a common-sense guess would be that this is a security feature.

If someone is attempting a brute-force attack, they will need the username and password using the system described above. If MySQL reported invalid users before prompting for a password, half of the work is already done for the attacker.

This is purely theoretical, as I haven't tested anything or been informed on the subject by anyone else - just an educated guess based on other systems.