10 thoughts on “Fixing ERROR 1396 (HY000): Operation CREATE USER failed

  1. The reason I had the same error was because I was using:
    mysql> drop user ‘foo’;
    rather than the correct one:
    mysql> drop user ‘foo’@”;
    where some_ip could be for instances…10.2.34.56
    I had previously created my user with:
    mysql> create user ‘foo’@’10.2.34.56’ identified by ‘mypassword’;

    By the way you need to put the user name foo between apex so ‘foo’ (not foo)

  2. In my case this didn’t fix it since I already had done this but still got the error. However I also had granted some privileges to the user though so maybe that is why. The user still showed up in the information_schema.USER_PRIVILEGES table. In order to fix it I just had to use the DROP USER statement.

  3. Can someone please tell me what’s wrong with this syntax for SQL Server version: 5.5.22-0ubuntu1 (Ubuntu)

    mysql_query(“create table `”.$mysql_table_prefix.”query_log` (
    query varchar(255),
    time timestamp(14),
    elapsed float(2),
    results int,
    key query_key(query))”);

  4. I ran into this problem too. One thing I did to remedy the problem was enter the “flush privileges” command, which seemed to wipe clean the proverbial slate. Then I did my normal “create user …” command and it worked like a champ.

Leave a comment