service-architecture/db
2024-12-21 14:12:53 +01:00
..
db.sh Scripts: Populating database, autocreating .env file. CI/CD: Removed Deployement for now. 2024-12-21 14:12:53 +01:00
db.sql Updated Database and created init scripts. 2024-12-16 15:07:03 +01:00
init.sh Scripts: Populating database, autocreating .env file. CI/CD: Removed Deployement for now. 2024-12-21 14:12:53 +01:00
init.sql Added init.sql. Added 'get_roles' REST api. 2024-12-20 09:47:01 +01:00
README.md Scripts: Populating database, autocreating .env file. CI/CD: Removed Deployement for now. 2024-12-21 14:12:53 +01:00
remove.sh Scripts: Populating database, autocreating .env file. CI/CD: Removed Deployement for now. 2024-12-21 14:12:53 +01:00

Database Initialization

Install mariadb:

On Arch-Linux

pacman -S mariadb
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo chown -R mysql:mysql /var/lib/mysql
sudo systemctl enable mariadb
sudo systemctl start mariadb

Create a user

sudo mariadb -u root -p
CREATE USER '<user>'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON *.* TO '<user>'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Run the init.sh to create the database.

If you want to update the database, it is recommended to run remove.sh before hand.