2012-04-04 74 views
0

我在我的EC2实例中安装MySQL,然后给root一个密码。MySQL:在给定root密码后无法创建用户帐户

现在我试图创建一个用户到localhost域和'%'域。 这是很好创建用户:

CREATE USER 'valter'@'localhost' IDENTIFIED BY '******'; 

但是当我尝试给予它一些privilegies:

GRANT ALL PRIVILEGES ON *.* TO 'valter'@'localhost' WITH GRANT OPTION; 

给我的跟随误差:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 

Here它说:

shell> mysql --user=root mysql If you have assigned a password to the root account, you will also need to supply a --password or -p option, both for this mysql command and for those later in this section.

但它应该如何看起来像命令呢?

我在做什么错在这里?

我想创建一个有权访问本地主机和外部网络的用户。

回答

1

这是EC2的问题,而不是MySQL。 Here's a relevant forum entry:

The issue is that the RDS instance does not have superuser rights so I can't "grant all privileges" to any user.

I was able to get my application to work by creating the user with the specific rights that I need (insert, update,create, etc)

本次论坛的讨论也可能是值得期待通过:

https://forums.aws.amazon.com/thread.jspa?threadID=64618

+0

理解,谢谢 – 2012-04-05 03:51:53

+0

呀 - 我们对此深感抱歉。 – 2012-04-05 03:52:57

+0

这是正确的吗?看起来这个答案是关系数据存储,但问题是关于在EC2实例上安装MySQL。 – Yahel 2012-12-25 05:27:19

相关问题