Bug #82974 CREATE USER error message is not clear
Submitted: 13 Sep 2016 16:55 Modified: 22 Sep 2016 10:27
Reporter: Oli Sennhauser Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S4 (Feature request)
Version:5.7.15 OS:Any
Assigned to: CPU Architecture:Any
Tags: create user, failed

[13 Sep 2016 16:55] Oli Sennhauser
Description:
The creation of a user failed. It took us about 30 minutes until we found that the error message indicates that the user already exists.

How to repeat:
mysql> create user 'dummy'@'%' identified by 'Abcdrs!12';
Query OK, 0 rows affected (0.00 sec)

mysql> -- minutes later

mysql> create user 'dummy'@'%' identified by 'Abcdrs!12';
ERROR 1396 (HY000): Operation CREATE USER failed for 'dummy'@'%'

Suggested fix:
Please use a better error message like "User 'dummy'@'%' already exists.".
[14 Sep 2016 9:29] Oli Sennhauser
Same situation with DROP USER:

mysql> drop user test;
ERROR 1396 (HY000): Operation DROP USER failed for 'test'@'%'

It is not true that the DROP USER failed. The DROP USER command failed because the user does not exist.
[22 Sep 2016 10:27] Umesh Shastry
Hello Oli,

Thank you for the feature request.
This is duplicate of Bug #28331

Thanks,
Umesh