django-mysql-manager:CREATE ROLE管理员WITH LOGIN CREATEDB CREATEROLE PASSWORD'1234';

时间:2014-09-20 04:39:49

标签: mysql django

安装django-mysql-manager

$ source <venv>/bin/activate
(venv)$ pip install django-mysql-manager
$ mysql -u root -p'root'
mysql> CREATE ROLE administrator WITH LOGIN CREATEDB CREATEROLE PASSWORD '1234';

我收到了错误消息:

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 'ROLE administrator WITH LOGIN CREATEDB CREATEROLE PASSWORD '1234'' at line 1

出了什么问题?

1 个答案:

答案 0 :(得分:1)

正如错误所说,这不是MySQL的有效命令。

MySQL没有任何角色这样的概念,因此该命令根本不存在。也许你想对PostreSQL运行它?