Describe mariadb database create user and database

This commit is contained in:
Thomas Kuschel 2024-07-14 23:53:32 +02:00
parent 3f223b399e
commit 1ce2f886e1

View File

@ -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