Fix: Check MySQL database name (#5991)

This commit is contained in:
Louis Lam
2025-08-31 01:26:32 +08:00
committed by GitHub
parent 668636c9d5
commit a4d2e077b8
4 changed files with 10 additions and 5 deletions

View File

@@ -208,11 +208,13 @@ class SetupDatabase {
// Test connection
try {
log.info("setup-database", "Testing database connection...");
const connection = await mysql.createConnection({
host: dbConfig.hostname,
port: dbConfig.port,
user: dbConfig.username,
password: dbConfig.password,
database: dbConfig.dbName,
});
await connection.execute("SELECT 1");
connection.end();