grant access to user on amazon RDS server - mysql

i need to grant all privileges for user master to the database 'mysql'(i mean the database not the server) on amazon RDS
i am trying to use
GRANT ALL PRIVILEGES ON mysql.* To 'master'#'aurora-wqeqwe-rdscluster-1jjch50tq2n3s.qrwerw-2.rds.amazon
aws.com' IDENTIFIED BY 'm3vyrtywrsY026y';

You can't grant SUPER privilege on RDS, so you can't use the ALL PRIVILEGES shortcut.
Sorry, you must name the privileges you want to grant explicitly, even if it means listing every privilege except SUPER.
You also can't grant privileges you don't have. I'm not sure your user has privileges to the mysql database. You can find out what privileges you have with SHOW GRANTS.

In your example is "master" any user or is it the name of your RDS Master User account? For the latter take a look at https://aws.amazon.com/premiumsupport/knowledge-center/duplicate-master-user-mysql/

I was also stuck with the same problem a while ago ad came across with this solution GRANT ALL PRIVILEGES ON '%'.* To 'master'#'aurora-wqeqwe-rdscluster-1jjch50tq2n3s.qrwerw-2.rds.amazon
aws.com' IDENTIFIED BY 'm3vyrtywrsY026y';
This worked for me.
for more information you can check the following link
http://www.fidian.com/problems-only-tyler-has/using-grant-all-with-amazons-mysql-rds

Related

Not enough privileges to grant privileges leading to error 1045. AWS [duplicate]

i need to grant all privileges for user master to the database 'mysql'(i mean the database not the server) on amazon RDS
i am trying to use
GRANT ALL PRIVILEGES ON mysql.* To 'master'#'aurora-wqeqwe-rdscluster-1jjch50tq2n3s.qrwerw-2.rds.amazon
aws.com' IDENTIFIED BY 'm3vyrtywrsY026y';
You can't grant SUPER privilege on RDS, so you can't use the ALL PRIVILEGES shortcut.
Sorry, you must name the privileges you want to grant explicitly, even if it means listing every privilege except SUPER.
You also can't grant privileges you don't have. I'm not sure your user has privileges to the mysql database. You can find out what privileges you have with SHOW GRANTS.
In your example is "master" any user or is it the name of your RDS Master User account? For the latter take a look at https://aws.amazon.com/premiumsupport/knowledge-center/duplicate-master-user-mysql/
I was also stuck with the same problem a while ago ad came across with this solution GRANT ALL PRIVILEGES ON '%'.* To 'master'#'aurora-wqeqwe-rdscluster-1jjch50tq2n3s.qrwerw-2.rds.amazon
aws.com' IDENTIFIED BY 'm3vyrtywrsY026y';
This worked for me.
for more information you can check the following link
http://www.fidian.com/problems-only-tyler-has/using-grant-all-with-amazons-mysql-rds

How to enable mysql remote access without grant all privileges

Need to access one mysql database for a user remotely. I know it will work if grant all privileges on all databases to that user, like:
grant all on \*.* to 'someone'#'%'
But I just want grant access permission to that user on the database specified, not every database, like:
grant all on mydb.* to 'someone'#'%'.
Unfortunately, remote access will be failed in this case.
Any idea to solve this? Thanks a lot.
Try this,
GRANT SELECT,UPDATE,INSERT,DELETE ON yourdb.* To your_user#'192.162.1.1' identified by 'password';

AWS Grant DBA MySQL

Hey I'm trying to grant my USER in mySQL the DBA role, because we are connecting to a AWS amazon server but no matter what we do, we can't grant that role to our user admin5 that's in the only user that we created. So please help because we need that privilege to create a Job that sends emails automatically at midnight.
This is how you can grant privileges to other users:
WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level.
You can check if your user has this option by running show grants for 'youruser'#'yourhost';
The root user usually has these privileges by default. Try logging in with root and granting the permissions you need.
Also, presumably your cron that you are going to be running does not need to have DBA permissions. Here is a list of Mysql permissions and what they do. Select and execute privileges would probably be sufficient enough for what you need.

Grant permissions to mysql user for future databases

I followed this post Grant on multiple databases. MySQL to be able to grant permissions over multiple databases to a mysql user. But I also want to make sure that these permissions persist when a new databases is added to the mysql server. Is there a way to do this?
If you grant all database and all table access to any MySQL user while creating then user can access all database/table created after creation of user account.
GRANT ALL PRIVILEGES ON *.* TO 'user'#'host' WITH GRANT OPTION;
You can use
GRANT ALL PRIVILEGES ON *.* TO 'user'#'hostname';
. represents database.table. * indicates all databases and all their tables.

Website connecting to database but not reading any data

I have four websites, each of which were being accessed with a singular username/password which had privileges on all of the databases.
However, for security reasons, I've finally set up a new user for each site, with each user only having access to the necessary database. Here is the code that I used to create the user and grant privileges for one particular database -
CREATE USER 'wedding1'#'localhost' IDENTIFIED BY 'somepass';
GRANT ALL PRIVILEGES ON wedding1.localhost TO 'wedding1'#'localhost';
However, when I log in to PHPMyAdmin using the credentials for the user I just created, the database is shown as expected but none of the tables are listed.
No entries are placed in my logs and I have tried to FLUSH PRIVILEGES;
Am I missing something from the above lines that could be causing this behaviour? Thanks.
You only granted privileges on a table called localhost within wedding1 DB. I am guessing this is not what you want. Change your grant statement as follows:
GRANT ALL PRIVILEGES ON wedding1.* TO 'wedding1'#'localhost';