I need to create a new MySQL user with limited permission on an existing Amazon RDS instance. After encountering a couple error messages I was sort of able to do this using the official MySQL Administrator tool and the user now appears in the list. However, I'm unable to assign any schema privileges as all the users are greyed out. I'm logged in as the "master user" created when the instance was launched. Not sure where to go from here. I do have the RDS command line tools installed but wasn't able to track down anything there either. Ideas
To create a MySQL DB instance with Easy createIn the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to create the DB instance. In the navigation pane, choose Databases. Choose Create database and make sure that Easy create is chosen. In Configuration, choose MySQL.
Amazon RDS supports MySQL Community Edition versions 5.6, 5.7, and 8.0 which means that the code, applications, and tools you already use today can be used with Amazon RDS.
Your best bet is probably to connect to the database with a mysql command line client and call the SQL commands to create a new user and assign him privileges.
For instance, you might run something like this:
mysql -u [your_master_username] -p -h YOURRDSENDPOINT.rds.amazonaws.com CREATE USER 'jeffrey'@'%' IDENTIFIED BY 'somepassword'; GRANT SELECT ON [your_database].[some_table] TO 'jeffrey'@'%';
On windows you could use the mysql.exe client, wherever that is.
Useful Docs
AWS RDS security groups documentation (a common area of confusion): http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html
User creation documentation: http://dev.mysql.com/doc/refman/5.5/en/create-user.html
Privilege granting documentation: http://dev.mysql.com/doc/refman/5.5/en/grant.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With