Lab Exercise 7a: Installing MySQL in AWS
INSTALLING MYSQL in AWS:
To Install MySQL sever in AWS, first ensure you have created an EC2 Instance and it is connected to the client.
Procedure:
1. Create an EC2 instance and connect it. (for details on how to do it refer my old blogs.)
2. Then type the following commands to install MySQL
sudo su
cd ../..
sudo apt-get update
sudo apt-get install mysql-server
3. Then to set a password for root user, use mysql session and run ALTER USER command:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by 'password';
4. Now execute the following command for secure installation:
sudo mysql_secure_installation
Then press y for all the upcoming prompts.
5. Now to login to our database, enter the command:
sudo mysql -u root -p
Then Enter the password that we created before.
6. Now we are connected to our mysql instance. We can create databases and create admins and grant privileges also.
Comments
Post a Comment