简体   繁体   中英

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). I've changed the password and am trying to log in with MySQL Workbench, but the connection is denies.

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.

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.

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 :)

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)

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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