创建一个新的MySQL用户在亚马逊RDS环境 [英] Creating A New MySQL User In Amazon RDS Environment

查看:378
本文介绍了创建一个新的MySQL用户在亚马逊RDS环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在现有的亚马逊RDS实例来创建一个新的MySQL用户提供有限的权限。遇到一对夫妇的错误消息后,我是那种能使用官方的MySQL管理工具,现在出现在列表中的用户这样做。但是,我无法为所有的用户都变灰指定任何模式的特权。我登录的时候,比如发起创建的主用户。不知道在哪里何去何从。我已经安装了RDS的命令行工具,但无法追查任何事情有两种。创意

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

推荐答案

您最好的选择可能是连接到数据库使用mysql命令行客户端,并调用SQL命令来创建一个新用户,并指定他的特权。

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'@'%';

在Windows中,您可以使用mysql.exe客户端,无论是。

On windows you could use the mysql.exe client, wherever that is.

有用的文档

AWS RDS安全组文件(混乱的公共区域):<一href="http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html">http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html

AWS RDS security groups documentation (a common area of confusion): http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithSecurityGroups.html

用户创建的文档:<一href="http://dev.mysql.com/doc/refman/5.5/en/create-user.html">http://dev.mysql.com/doc/refman/5.5/en/create-user.html

权限授予文件:<一href="http://dev.mysql.com/doc/refman/5.5/en/grant.html">http://dev.mysql.com/doc/refman/5.5/en/grant.html

这篇关于创建一个新的MySQL用户在亚马逊RDS环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆