ERROR 1396 (HY000): Operation CREATE USER failed for 'username'@'localhost' IDENTIFIED BY 'mypassword';

后端 未结 3 1711
日久生厌
日久生厌 2020-12-16 15:35

Mistakenly I deleted my root user from my mysql.user table.

delete from mysql.user where user=\'username\';

To make same root

3条回答
  •  一整个雨季
    2020-12-16 16:15

    As for the above, password field does not exist in my case and mysql throws an error.

    This command helped:

    INSERT INTO mysql.user (user, host, ssl_cipher, x509_issuer, x509_subject, plugin, authentication_string) VALUES ('user', 'localhost', '', '', '', 'mysql_native_password', PASSWORD('pass'));
    

提交回复
热议问题