MySQL: Cannot create user account after given root a password

Go To StackoverFlow.com

0

I install the MySQL in my EC2 instance, then I give to root a password.

Now I'm trying to create an user to localhost domain and '%' domain too. It was fine to create the user:

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

But when I try to grant it some privilegies :

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

Gives me the follow error:

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

Here it says :

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.

But how it should look like the command then ?

What I'm doing wrong here ?

I would like to create an user that have access to localhost and external network too.

2012-04-04 21:46
by Valter Silva


1

This is an issue with EC2, not 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)

This forum discussion may also be worth looking through:

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

2012-04-04 21:52
by Ian Hunter
understood, thank yo - Valter Silva 2012-04-05 03:51
Yeah--sorry about that - Ian Hunter 2012-04-05 03:52
Is this correct? It seems like this answer is for Relational Datastore, but the question is about having installed MySQL on an EC2 instance - Yahel 2012-12-25 05:27
Ads