From 1a053ca047705d7dafcb17b077ad7b24f70cd333 Mon Sep 17 00:00:00 2001 From: vibsin9322 Date: Fri, 22 Aug 2025 11:23:39 +0900 Subject: [PATCH] Fix MariaDB connection to use Unix socket --- database/mariadb-helper.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/database/mariadb-helper.js b/database/mariadb-helper.js index 439c263..c8760f7 100644 --- a/database/mariadb-helper.js +++ b/database/mariadb-helper.js @@ -5,15 +5,11 @@ class MariaDBHelper { constructor() { this.connection = null; this.config = { - host: 'localhost', - port: 3306, + socketPath: '/run/mysqld/mysqld10.sock', user: 'jaryo_user', password: 'JaryoPass2024!@#', database: 'jaryo', - charset: 'utf8mb4', - timezone: '+09:00', - acquireTimeout: 60000, - timeout: 60000 + charset: 'utf8mb4' }; } @@ -21,7 +17,7 @@ class MariaDBHelper { try { if (!this.connection || this.connection.connection._closing) { this.connection = await mysql.createConnection(this.config); - console.log('✅ MariaDB 연결 성공'); + console.log('✅ MariaDB 연결 성공 (Unix Socket)'); } return this.connection; } catch (error) {