2015-01-10 28 views
1

我創建MySQL中的數據庫,並跑了命令 -ERROR 1396(HY000):操作CREATE USER失敗

create database projectdb; 
create user 'aquaman'@'localhost' identified by password'aquaman123'; 

,它給了無差錯

ERROR 1396 (HY000): Operation CREATE USER failed for 'aquaman'@'localhost' 

請人幫助我如何解決它

+0

這是否幫助http://stackoverflow.com/questions/5555328/error-1396- hy000-operation-create-user-failed-for-jacklocalhost? –

回答

1

不正確的語法!

您的代碼中包含額外的password

create user 'aquaman'@'localhost' identified by password'aquaman123'; 

TO: 從更改代碼

CREATE USER 'user'@'localhost' IDENTIFIED BY 'aquaman123'; 

請查看文檔:http://dev.mysql.com/doc/refman/5.0/en/create-user.html