Note that there are some explanatory texts on larger screens.

plurals
  1. POERROR 1396 (HY000): Operation CREATE USER failed for 'jack'@'localhost'
    text
    copied!<p>I seem to be unable to re-create a simple user I've deleted, even as root in MySQL.</p> <p>My case: user 'jack' existed before, but I deleted it from mysql.user in order to recreate it. I see no vestiges of this in that table. If I execute this command for some other, random username, say 'jimmy', it works fine (just as it originally did for 'jack').</p> <p>What have I done to corrupt user 'jack' and how can I undo that corruption in order to re-create 'jack' as a valid user for this installation of MySQL?</p> <p>See example below. (Of course, originally, there was much time between the creation of 'jack' and his removal.)</p> <pre><code>mysql&gt; CREATE USER 'jack'@'localhost' IDENTIFIED BY 'test123'; Query OK, 0 rows affected (0.00 sec) mysql&gt; select user,host from user; +------------------+-----------------+ | user | host | +------------------+-----------------+ | root | 127.0.0.1 | | debian-sys-maint | localhost | | jack | localhost | | root | localhost | | root | russ-elite-book | +------------------+-----------------+ 5 rows in set (0.00 sec) mysql&gt; delete from user where user = 'jack'; Query OK, 1 row affected (0.00 sec) mysql&gt; select user,host from user; +------------------+-----------------+ | user | host | +------------------+-----------------+ | root | 127.0.0.1 | | debian-sys-maint | localhost | | root | localhost | | root | russ-elite-book | +------------------+-----------------+ 4 rows in set (0.00 sec) mysql&gt; CREATE USER 'jack'@'localhost' IDENTIFIED BY 'test123'; ERROR 1396 (HY000): Operation CREATE USER failed for 'jack'@'localhost' mysql&gt; CREATE USER 'jimmy'@'localhost' IDENTIFIED BY 'test123'; Query OK, 0 rows affected (0.00 sec) mysql&gt; select user,host from user; +------------------+-----------------+ | user | host | +------------------+-----------------+ | root | 127.0.0.1 | | debian-sys-maint | localhost | | jimmy | localhost | | root | localhost | | root | russ-elite-book | +------------------+-----------------+ 5 rows in set (0.00 sec) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload