How To

Setting RDS Conf In AWS Console

Login To SQL And Create User With AWSAuthenticationPlugin

mysql -h endpoint -u admin -p 

CREATE USER {dbusername} IDENTIFIED WITH AWSAuthenticationPlugin as 'RDS';
use mysql

select * from user where User = 'dbusername' ;

Setting AWS Credetial

aws configure

Get CA And Login With CA



TOKEN="$(aws rds generate-db-auth-token --hostname $RDSHOST --port 3306 --region ap-south-1 --username wei)"

mysql --host=$RDSHOST --port=3306 --ssl-ca=./rds-ca-2019-root.pem --enable-cleartext-plugin --user=wei --password=$TOKEN