From 1ce2f886e1f953426bc5805a3f06ca320d163b3b Mon Sep 17 00:00:00 2001 From: Thomas Kuschel Date: Sun, 14 Jul 2024 23:53:32 +0200 Subject: [PATCH] Describe mariadb database create user and database --- afu/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/afu/README.md b/afu/README.md index 2acd99b..09dbdf6 100644 --- a/afu/README.md +++ b/afu/README.md @@ -223,6 +223,30 @@ Clone the repository `script` to your site with: ## Connecting to MariaDB database +### Install mariadb database + + $ yay -S mariadb + +Configure the database with e.g. + + $ sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql + +Enable and start the database service with: + + $ sudo systemctrl enable mariadb.service + $ sudo systemctrl start mariadb.service + +#### Create a user "om" who has only access to the database table + + # mariadb + + CREATE DATABASE callbook; + + GRANT ALL PRIVILEGES ON callbook.* TO 'om'@'localhost' IDENTIFIED BY 'oe3tkt'; + + FLUSH PRIVILEGES; + QUIT; + ## Install python-mariadb $ yay -S python-mysql-connector