[Solved] MySQL User Operation - ERROR 1396 (HY000): Operation CREATE / DROP USER failed for 'user'@'host'

Error Message:
ERROR 1396 (HY000): Operation CREATE USER failed for 'admin'@'%'

Generic Error Message:
Operation %s failed for %s

Error Scenario:
Operation CREATE USER failed
Operation DROP USER failed

Reason:
The reason for this error is, you are trying to do some user operation but the user does not exist on the MySQL system. Also, for drop user, the user details are stored somewhere in the system, even though, you have already dropped the user from MySQL server.

Resolution:
Revoke all access granted to the user, drop the user, and run FLUSH PRIVILEGE command to remove the caches. Now create/drop/alter the user, it will work.

REVOKE ALL ON *.* FROM 'user'@'host';
DROP USER 'user'@'host';
FLUSH PRIVILEGES;

Grant Tables:
The following tables will help you in identifying the user related informations (as of MySQL 5.7):

mysql.user: User accounts, global privileges, and other non-privilege columns
mysql.db: Database-level privileges
mysql.tables_priv: Table-level privileges
mysql.columns_priv: Column-level privileges
mysql.procs_priv: Stored procedure and function privileges
mysql.proxies_priv: Proxy-user privilege




Related MySQL Bug Reports:

I hope this post will help you, if you faced this error on some other scenarios or if you know, some other workaround / solution for this error, please add on the comment section. It will be helpful for other readers.




10 comments:

  1. Replies
    1. REAL AND GENUINE ONLINE LOVE SPELL CASTER TO BRING EX LOVER URGENTLY CALL OR WHATSAPP +2348118829899. 

      I want to use this opportunity I have to say a big thanks to Dr Great for getting back my ex husband. I’m Linda Gibson from USA, after 7 years of marriage my husband left me for another woman I did whatever I could to get him back but all I did was in vain I was sad, but I didn’t lose hope of getting him back because I had faith in God. So I search online on how to get my husband back, and I came across a post of Dr Great of how he helped a lady to get back her ex, I contacted him and told him the pain I was going through, he told me what to do and I did it, then he casted a love spell for me 48 hours later my husband called me and told me he is sorry for what he did and that he misses me very much, later that day he came back home and beg for my forgiveness, since then our love grew stronger. For the marvelous things Dr Great has done for me it would be unfair for me not to let the whole world know that such a powerful spell caster do live. If you want to get back your ex fast email Dr Great at infinitylovespell@gmail.com or infinitylovespell@yahoo.com or add him up on WhatsApp +2348118829899 Blog: lindagibson90.blogspot.com view his blog http://infinitylovespell1.blogspot.com








      REAL AND GENUINE ONLINE LOVE SPELL CASTER TO BRING EX LOVER URGENTLY CALL OR WHATSAPP +2348118829899. 

      I want to use this opportunity I have to say a big thanks to Dr Great for getting back my ex husband. I’m Linda Gibson from USA, after 7 years of marriage my husband left me for another woman I did whatever I could to get him back but all I did was in vain I was sad, but I didn’t lose hope of getting him back because I had faith in God. So I search online on how to get my husband back, and I came across a post of Dr Great of how he helped a lady to get back her ex, I contacted him and told him the pain I was going through, he told me what to do and I did it, then he casted a love spell for me 48 hours later my husband called me and told me he is sorry for what he did and that he misses me very much, later that day he came back home and beg for my forgiveness, since then our love grew stronger. For the marvelous things Dr Great has done for me it would be unfair for me not to let the whole world know that such a powerful spell caster do live. If you want to get back your ex fast email Dr Great at infinitylovespell@gmail.com or infinitylovespell@yahoo.com or add him up on WhatsApp +2348118829899 Blog: lindagibson90.blogspot.com view his blog http://infinitylovespell1.blogspot.com

      Delete
  2. good post.. i find it much help full

    ReplyDelete
  3. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  4. I can’t believe focusing long enough to research; much less write this kind of article. You’ve outdone yourself with this material without a doubt. It is one of the greatest contents. traffic secrets

    ReplyDelete
  5. Omg I Finally Got Helped  !! I'm so excited right now, I just have to share my testimony on this Forum.. The feeling of being loved takes away so much burden from our shoulders. I had all this but I made a big mistake when I cheated on my wife with another woman  and my wife left me for over 4 months after she found out..  I was lonely, sad and devastated. Luckily I was directed to a very powerful spell caster Dr Emu who helped me cast a spell of reconciliation on our Relationship and he brought back my wife and now she loves me far more than ever.. I'm so happy with life now. Thank you so much Dr Emu, kindly Contact  Dr Emu Today and get any kind of help you want.. Via Email emutemple@gmail.com or Call/WhatsApp +2347012841542

    ReplyDelete
  6. REAL AND GENUINE ONLINE LOVE SPELL CASTER TO BRING EX LOVER URGENTLY CALL OR WHATSAPP +2348118829899. 

    I want to use this opportunity I have to say a big thanks to Dr Great for getting back my ex husband. I’m Linda Gibson from USA, after 7 years of marriage my husband left me for another woman I did whatever I could to get him back but all I did was in vain I was sad, but I didn’t lose hope of getting him back because I had faith in God. So I search online on how to get my husband back, and I came across a post of Dr Great of how he helped a lady to get back her ex, I contacted him and told him the pain I was going through, he told me what to do and I did it, then he casted a love spell for me 48 hours later my husband called me and told me he is sorry for what he did and that he misses me very much, later that day he came back home and beg for my forgiveness, since then our love grew stronger. For the marvelous things Dr Great has done for me it would be unfair for me not to let the whole world know that such a powerful spell caster do live. If you want to get back your ex fast email Dr Great at infinitylovespell@gmail.com or infinitylovespell@yahoo.com or add him up on WhatsApp +2348118829899 Blog: lindagibson90.blogspot.com view his blog http://infinitylovespell1.blogspot.com

    ReplyDelete