AWS

Creating an EC2 Instance

  1. Region: Mumbai (ap-south-1)
  2. Name: web-server
  3. AMI: Ubuntu Server 24.04
  4. Instance Type: t2.micro
  5. Key Pair: kdoc-may21
  6. Disk: 100 GB

Set Permissions for the PEM File

chmod 400 ~/Downloads/kdoc-may21.pem

Connect to the EC2 Instance

ssh -i ~/Downloads/kdoc-may21.pem [email protected]

EC2 Instance Configuration

MySQL Setup

  1. Update the apt cache:

    sudo apt-get update
    
    
  2. Install MySQL server:

    sudo apt-get install mysql-server
    
    
  3. Start MySQL with root permissions:

    sudo mysql
    
    
  4. Configure MySQL root user:

    ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root:mysql';
    FLUSH PRIVILEGES;
    
    

Backend Setup