cvwiki

Nov 5, 2022

# How to connect To RDS with MySQL Client:

  1. Install mariadb and mariadb-client so that you can connect to the RDS instance:
1
brew install mariadb
1
brew install mariadb-client
  1. Verify install:
1
mysql --version
  1. Connect to your instance (-p prompts for password):
1
mysql -h $WRITER_INSTANCE -P $PORT -u $DB_USER -p

# Create User in RDS (MySQL engine)

  1. View grants for master user as a reference, carefully determine the permissions that make sense for your user:
1
SHOW GRANTS for master_user;
  1. Create new user and password:
1
CREATE USER 'new_user'@'%' IDENTIFIED BY 'password';
  1. Grant permissions to the new user with the GRANT command:
1
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON *.* TO 'new_user'@'%' WITH GRANT OPTION;

user: Don’t give CREATE USER, INVOKE SAGEMAKER, INVOKE COMPREHEND, SELECT INTO S3, LOAD FROM S3

# RDS - Relational Database Service

# Storage Options

# RDS Backups And Restores

# RPO - Recovery Point Objective

# RTO - Recovery Time Objective

# Manual Snapshots

# Automated Backups

# RDS Restores

# RDS Read-Replicas

# Enhanced Monitoring

# IAM DB Authentication

# Multi-AZ ( #highly-available #high-availability )

# RDS Storage Auto Scaling

# Database Instance Types

# Security Considerations

# #IAM #database #authentication for MySQL and PostgreSQL

You can authenticate to your DB instance using AWS Identity and Access Management (IAM) database authentication. IAM database authentication works with MySQL and PostgreSQL. With this authentication method, you don’t need to use a password when you connect to a DB instance. Instead, you use an authentication token. Use IAM DB Authentication and create database accounts using the AWS-provided AWSAuthenticationPlugin plugin in MySQL.

#aws #relational-database #relational #sql