SWS-5007 / My-Experience

13 stars 0 forks source link

AWS - How to create a second database in the same RDS instance on AWS RDS? #14

Open SWS-5007 opened 1 year ago

SWS-5007 commented 1 year ago
  1. Connect your RDS instance through master password. mysql -h <host_url> -P 3306 -u <master_user_name> -p
  2. Now in RDS instance (MySQL) shell prompt. You can create a new database and a new user.

mysql>CREATE USER 'newusername'@'%' IDENTIFIED BY 'password'; mysql> CREATE DATABASE newdatabase; mysql> GRANT ALL PRIVILEGES on newdatabase.* To newusername@'%'; mysql> FLUSH PRIVILEGES; mysql> SHOW databases;