修复:错误1396(HY000):操作CREATE USER在MySQL中失败?
要修复该错误,让我们看看如何正确创建用户。让我们创建一个用户-
mysql> create user 'Emma'@'localhost' IDENTIFIED BY 'emma_654';
让我们显示所有用户以及主机-
mysql> select user,host from MySQL.user;
这将产生以下输出。上面创建的新用户与主机一起在下面所有用户的列表中可见-
+------------------+-----------+ | user | host | +------------------+-----------+ | Bob | % | | Charlie | % | | Robert | % | | User2 | % | | mysql.infoschema | % | | mysql.session | % | | mysql.sys | % | | root | % | | @UserName@ | localhost | | Adam | localhost | | Adam Smith | localhost | | Chris | localhost | | David | localhost | | Emma | localhost | | Jace | localhost | | James | localhost | | John | localhost | | John Doe | localhost | | Michael | localhost | | Mike | localhost | | Robert | localhost | | User1 | localhost | | am | localhost | | hbstudent | localhost | | mysql.infoschema | localhost | | mysql.session | localhost | +------------------+-----------+ 26 rows in set (0.00 sec)