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] MySQL Verification Team
Hello Oli,

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

Thanks,
Umesh

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.