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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

Is this correct? It seems like this answer is for Relational Datastore, but the question is about having installed MySQL on an EC2 instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.