2015-02-09 133 views
0

我正在尝试在MySQL 5.6中创建新用户,但在执行查询时出现错误。请帮忙。无法在mysql中创建新用户

mysql> create user [email protected]'%' indentified by 'Passw0rd';<br></b> 
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near 'indentified by 'Passw0rd'' at line 1 
+0

该关键字拼写为**'IDENTIFIED' **,而不是**'INDENTIFIED' **。 – spencer7593 2015-02-09 06:32:06

回答

2
CREATE USER 'dsuser'@'%' IDENTIFIED BY 'Passw0rd'; 

不要忘记在你的用户名引号为好。

0
create user 'dsuser'@'%' indentified by 'Passw0rd'; 
+0

@Jens - 围绕用户名引用,因为它是必需的。 – 2015-02-09 06:18:56

+0

@JoelCox请将解释添加到您的答案中。 – Jens 2015-02-09 06:19:20

+0

对此也有同样的错误。我已经尝试过了。 – raj 2015-02-09 06:19:24