How To Create A Second Database Schema In The Same RDS Instance On Amazon RDS

If you want to create another user with master user and that will create another database schema in running RDS instance . So you may follow the below steps. connect your RDS instance through master password and user ( which is create on RDS creation time) from Bash shell.

# mysql -h <....rds.amazonaws.com> -u linuxpoint -p

now in RDS instance (mysql) shell prompt.

Note: User: awspoint  and DatabaseName: linux_point –  replace this both with your database name and user name and remove “<>” this. 

mysql> CREATE USER '<awspoint>'@'%' IDENTIFIED BY '<password>';
mysql> CREATE DATABASE <linux_point>;
mysql> GRANT ALL PRIVILEGES on <linux_point>.* To <awspoint>@'%';
mysql> GRANT ALL PRIVILEGES ON `<linux_point>`.* TO '<awspoint>'@'%';
mysql> FLUSH PRIVILEGES;

Now you may see your newly created database mysql> SHOW databases;

Now you have to exit this, mysql> \q;

And now you be able to login with new user with new_database

# mysql -h <....rds.amazonaws.com> -u <awspoint> --database <linux_point> -p
mysql>_

And now you be able to restore the dump (from bash shell) in your newly database or you can create tables and all whatever you want with it which will be valid as per requirements.

# mysql -h <....rds.amazonaws.com> -u <awspoint> --database <linux_point> -p < dump.sql
@Thank you

SaveSave

Advertisements

What is DevOps?

2000px-devops-svg_What is Devops?

DevOps” as a term was first coined in 2009 by Patrick Debois, who became one of its chief proponents. Simply put, DevOps is a combination of software development and operations — and as its name suggests, it’s a melding of these two disciplines in order to emphasize communication, collaboration, and cohesion between the traditionally separate developer and IT operations teams.

JBL E45BT On-Ear Wireless Headphones (Blue) INR 6,499.00

Continue reading

Important AWS DevOps Interview Questions To Ask

AWS_DevopsTOP AWS DevOps’s Questions

If you’re cloud engineer, specially someone who knows Amazon Web Services (AWS) you’ll want to have a bunch of questions to ask them to share their knowledge.  As with any AWS DevOps interview.

what is VPC ?

virtual private cloud (VPC) is a virtual network dedicated to your AWS account. You can configure or create your VPC as per requirement like select region, create subnets (IP- CIDR), configure route tables, security groups, Internet gateway etc to your AWS account By which you can launch your AWS resources, such as Amazon EC2, RDS instances etc, into your VPC Continue reading