Before starting , it would be helpful to download these dependencies

#installing nginx, mysql-server and other php dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install nginx mysql-server php-fpm php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip unzip -y

Setting Up SQL

sudo apt install my-sql -y

Check status of mysql server first

image.png

Running SQL security configurations

sudo mysql_secure_installation

image.png

Login into SQL

sudo mysql

Creating a Database for wordpress

mysql> CREATE DATABASE wp_site;

To check the databse , we can run

mysql> SHOW DATABSES;

image.png

Creating user to access the user