mariadb-setup

This commit is contained in:
2026-08-04 21:35:23 +02:00
parent d14690c525
commit 77d2b27519
2 changed files with 15 additions and 10 deletions
+3 -10
View File
@@ -39,17 +39,10 @@ Volume in den Container gemountet.
## 3. Datenbank vorbereiten
```
mysql -h mariadb.internal -u root -p < sql/schema.sql
```
Falls Datenbank und Benutzer noch nicht existieren, führe dieses Skript einmalig aus:
Falls Datenbank und Benutzer noch nicht existieren, vorher z. B.:
```sql
CREATE DATABASE contacts CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'contacts_sync'@'%' IDENTIFIED BY 'ein-sicheres-passwort';
GRANT ALL PRIVILEGES ON contacts.* TO 'contacts_sync'@'%';
FLUSH PRIVILEGES;
```bash
mysql -u root -p < mariadb-setup.sql
```
## 4. Umgebungsvariablen konfigurieren