Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL connection through UNIX socket #693

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions doc/conf-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ dbType: mysql

#### MySQL の接続設定(MySQL 使用時は必須)

| 子プロパティ名 | 種類 | 必須 | 説明 |
| -------------- | ------ | ---- | ---------------------------- |
| host | string | yes | MySQL が動作するホスト名 |
| port | number | no | MySQL が待ち受けるポート番号 |
| user | string | yes | DB 接続用のユーザー名 |
| password | string | yes | DB 接続用のパスワード |
| database | string | yes | 使用するデータベース名 |
| charset | string | no | 使用する文字コード |
| 子プロパティ名 | 種類 | 必須 | 説明 |
| -------------- | ------ | ---- | ------------------------------------ |
| host | string | yes | MySQL が動作するホスト名 |
| port | number | no | MySQL が待ち受けるポート番号 |
| socketPath | string | no | MySQL が待ち受けるソケットのフルパス |
| user | string | yes | DB 接続用のユーザー名 |
| password | string | yes | DB 接続用のパスワード |
| database | string | yes | 使用するデータベース名 |
| charset | string | no | 使用する文字コード |

```yaml
mysql:
Expand Down
1 change: 1 addition & 0 deletions ormconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ switch (config.dbtype) {
type: 'mysql',
host: config.mysql.host,
port: config.mysql.port,
socketPath: config.mysql.socketPath,
username: config.mysql.user,
password: config.mysql.password,
database: config.mysql.database,
Expand Down
1 change: 1 addition & 0 deletions src/model/IConfigFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default interface IConfigFile {
host: string;
user: string;
port: number;
socketPath: string;
password: string;
database: string;
charset?: string;
Expand Down
1 change: 1 addition & 0 deletions src/model/db/DBOperator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export default class DBOperator implements IDBOperator {
type: 'mysql',
host: this.config.mysql.host,
port: this.config.mysql.port,
socketPath: this.config.mysql.socketPath,
username: this.config.mysql.user,
password: this.config.mysql.password,
database: this.config.mysql.database,
Expand Down