diff --git a/src/backend/model/database/sql/SQLConnection.ts b/src/backend/model/database/sql/SQLConnection.ts index b3c9bd8c..d37604ad 100644 --- a/src/backend/model/database/sql/SQLConnection.ts +++ b/src/backend/model/database/sql/SQLConnection.ts @@ -174,7 +174,7 @@ export class SQLConnection { driver = { type: 'mysql', host: config.mysql.host, - port: 3306, + port: config.mysql.port, username: config.mysql.username, password: config.mysql.password, database: config.mysql.database, diff --git a/src/common/config/private/PrivateConfig.ts b/src/common/config/private/PrivateConfig.ts index d7b9e49d..73c65f9c 100644 --- a/src/common/config/private/PrivateConfig.ts +++ b/src/common/config/private/PrivateConfig.ts @@ -38,6 +38,8 @@ export module ServerConfig { export class MySQLConfig { @ConfigProperty({envAlias: 'MYSQL_HOST'}) host: string = ''; + @ConfigProperty({envAlias: 'MYSQL_PORT'}) + port: number = 3306; @ConfigProperty({envAlias: 'MYSQL_DATABASE'}) database: string = ''; @ConfigProperty({envAlias: 'MYSQL_USERNAME'}) diff --git a/src/frontend/app/ui/settings/database/database.settings.component.html b/src/frontend/app/ui/settings/database/database.settings.component.html index ee63a2be..b2f632b4 100644 --- a/src/frontend/app/ui/settings/database/database.settings.component.html +++ b/src/frontend/app/ui/settings/database/database.settings.component.html @@ -36,31 +36,39 @@
- +
+ [(ngModel)]="settings.mysql.host" id="mysql_host" name="mysql_host" required>
- + +
+ +
+
+ +
+
+ [(ngModel)]="settings.mysql.database" id="mysql_database" name="mysql_database" required>
- +
+ [(ngModel)]="settings.mysql.username" id="mysql_username" name="mysql_username" required>
- +
+ [(ngModel)]="settings.mysql.password" id="mysql_password" name="mysql_password" required>