How do I create a new MySQL user and grant permissions in AWS RDS cloud service from the Linux command line?

MySQL is a free and open-source database. Many websites on the Internet use MySQL along with Python, Perl, PHP, and other server-side programming languages. AWS offers managed MySQL service with high availability options, including backups, restores, and patching. This quick tutorial explains how to create MySQL user accounts and grant privileges on AWS RDS using Linux command-line options.

Tutorial requirementsOperating system/appAWS RDS (MySQL or MariaDB instance)Root privileges requiredYesDifficultyEasy (rss)Estimated completion time5mTable of contents

ADVERTISEMENTS

Prerequisite

The following commands work with both MariaDB and MySQL RDS instance.

Obviously, you need an AWS account along with MySQL/MariaDB RDS and EC2/Lightsail instance running. I am also assuming that you have mysql client installed on your EC2/Lightsail Linux server. For example, we can install the mysql client as follows. First, log in using the ssh command:

ssh -i ~/.ssh/EC2-keypem.pem ec2-user@ec2-54-161-60-164.compute-1.amazonaws.com

#[object object] #[object object] #[object object] #[object object] #[object object] #[object object]

How to create MySQL user and grant permissions in AWS RDS
1.60 GEEK