ERROR 1396 (HY000): Operation CREATE USER failed for 'saravanakumar'@'localhost'
确实表明用户已经存在或确实存在.
FLUSH PRIVILEGES不会删除用户.
Reloads the privileges from the grant tables in the mysql database.
The server caches information in memory as a result of GRANT, CREATE USER,
CREATE SERVER, and INSTALL PLUGIN statements. This memory is not released
by the corresponding REVOKE, DROP USER, DROP SERVER, and UNINSTALL PLUGIN
statements, so for a server that executes many instances of the statements
that cause caching, there will be an increase in memory use.
This cached memory can be freed with FLUSH PRIVILEGES.
您正在寻找DROP USER.
DROP USER user [, user] ...
商业秩序是:
DROP USER 'saravanakumar'@HOSTNAME;
CREATE USER 'saravanakumar'@HOSTNAME [IDENTIFIED BY 'password'];
如果您使用delete(不要),则可能需要刷新权限.
请记住:这并不一定会撤销用户可能拥有的所有权限(如表格权限),您将不得不自行执行此操作 – 如果您不这样做,您可能无法重新创建用户.
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'saravanakumar'@HOSTNAME;
DELETE FROM mysql.user WHERE user='saravanakumar';
FLUSH PRIVILEGES;
CREATE USER 'saravanakumar'@HOSTNAME [IDENTIFIED BY 'password'];
“用户”要求您指定帐户名称
Syntax for account names is 'user_name'@'host_name'
和
An account name consisting only of a user name is equivalent
to 'user_name'@'%'. For example, 'me' is equivalent to 'me'@'%'.
请阅读这些错误报告以进一步澄清