简体   繁体   English

Amazon RDS MySQL:设置用户名和密码

[英]Amazon RDS MySQL: setting user names and passwords

I'm trying to allow an application to connect via a connection string, and am having no luck; 我试图允许应用程序通过连接字符串连接,并且没有运气; the application asks for a password. 应用程序要求输入密码。 The only password I can find in the console is for the root user (which I guess is also the master password). 我可以在控制台中找到的唯一密码是root用户(我猜也是主密码)。 I've changed the password and am trying to log in with MySQL Workbench, but the connection is denies. 我已经更改了密码并尝试使用MySQL Workbench登录,但连接无效。

What gives? 是什么赋予了? Is there a way I can create a new user and password? 有没有办法可以创建新用户和密码? If not, how long does it take for a new master password to set? 如果没有,设置新的主密码需要多长时间?

You will use the credentials you supplied when the instance was first created (see screenshot) 您将使用首次创建实例时提供的凭据(请参见屏幕截图)

在此输入图像描述

That's the "root" permissions you have after instance creation. 这是实例创建后的“root”权限。

If you recently changed the password, it doesn't take long to update. 如果您最近更改了密码,则更新时间不会太长。 As long as the instance is an an available state on the RDS console you should be good with that new password. 只要实例在RDS控制台上是可用状态,您就应该使用新密码。

No matter what you're going to need to know the username of the master user which was configured at instance creation. 无论您需要知道在创建实例时配置的主用户的用户名。

Once that's done you should use individual MySQL users to make application connections, but that's a story for a different thread :) 一旦完成,你应该使用单独的MySQL用户来建立应用程序连接,但这是一个不同的线程的故事:)

If you still cannot connect, ensure your Security Groups assigned to the instance allow connection from wherever you're connecting from and ensure your firewall isn't blocking outbound to MySQL port (3306) 如果仍然无法连接,请确保分配给实例的安全组允许从您连接的任何位置进行连接,并确保防火墙不阻止出站到MySQL端口(3306)

Some helpful links regarding MySQL in RDS: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateInstance.html 有关RDS中MySQL的一些有用链接: https//docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateInstance.html

Some helpful links regarding MySQL general user management (after you get logged in as the master account): https://dev.mysql.com/doc/refman/5.7/en/create-user.html http://www.mysqltutorial.org/mysql-create-user.aspx 有关MySQL一般用户管理的一些有用链接(在您以主帐户登录后): https ://dev.mysql.com/doc/refman/5.7/en/create-user.html http://www.mysqltutorial .ORG / MySQL的创建,user.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM