Set up mysql and db

This commit is contained in:
2025-05-15 19:22:59 +02:00
parent 082e06be7b
commit fa0530e18c
3 changed files with 23 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env python3
"""This module contains the back end of the application
"""
+15
View File
@@ -0,0 +1,15 @@
-- Creates an user
CREATE USER
IF NOT EXISTS 'admin'@'%' IDENTIFIED BY '@Avatarme1';
-- Grant rights to admin user
GRANT ALL PRIVILEGES ON `CMT`.* TO 'admin'@'%';
FLUSH PRIVILEGES;
-- Create DB
CREATE DATABASE
IF NOT EXISTS CMT;
-- Create table
CREATE TABLE
IF NOT EXISTS clients;
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# Setting up the mysql
sudo apt update -y && sudo apt upgrade -y
sudo apt install mysql-server