This guide explains how to set up MariaDB, create a database, and Create Database User
Installing MariaDB on Ubntu
apt update && apt install mariadb-server -yOpen the Command Prompt as Administrator and run the following command to secure your installation:
mysql_secure_installationFollow the prompts to: Set a root password. Remove insecure default users and test databases. Disable remote root login.
Open terminal and login to MariaDB:
mysql -u root -pEnter the root password when prompted.
Create a new database and user:
CREATE DATABASE student_db;
GRANT ALL PRIVILEGES ON springbackend.* TO 'username'@'localhost' IDENTIFIED BY 'your_password';Replace username and your_password with your desired username and password.
Exit MariaDB:
EXIT;- DB_HOST
- DB_USER
- DB_PASS
- DB_PORT
- DB_NAME