Installation and Database Setup

MYSQL


To get started, you'll need to install MySQL and create a new database for the API. Here's how you can do it on your Linux server:

Install Mysql

sudo apt update
sudo apt install mysql-server

Secure MySQL Installation

After installation, it's important to run the following command to secure your MySQL instance:

sudo mysql_secure_installation

Create a Database

Once MySQL is installed and running, you'll need to create a database for the API

sudo mysql -u root -p
CREATE DATABASE mydatabase;
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mydatabase.* TO 'username'@'localhost';
FLUSH PRIVILEGES;

Exit MySQL

EXIT;

Last updated