feat: implement MariaDbOperationService for database management and add MariaDB configuration template

This commit is contained in:
Ümit Tunç
2026-03-30 13:47:41 +03:00
parent 443f5641aa
commit c2d262f482
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ export class MariaDbOperationService {
async createDatabaseAndUser(config: MariaDbConfig, dbName: string, user: string, pass: string): Promise<{ success: boolean; message: string }> {
const queries = [
`CREATE DATABASE IF NOT EXISTS \`${dbName}\` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;`,
`CREATE DATABASE IF NOT EXISTS \`${dbName}\` CHARACTER SET utf8 COLLATE utf8_unicode_ci;`,
`CREATE USER IF NOT EXISTS '${user}'@'%' IDENTIFIED BY '${pass}';`,
`GRANT ALL PRIVILEGES ON \`${dbName}\`.* TO '${user}'@'%';`,
`FLUSH PRIVILEGES;`