Skip to content

Commit

Permalink
feat: added socketPath support for replicas in MySQL driver (#7459)
Browse files Browse the repository at this point in the history
Co-authored-by: Maarten Baijs <mbaijs@harlemnext.com>
  • Loading branch information
wieringen and Maarten Baijs committed Mar 29, 2021
1 parent 2dcb493 commit 8d7afaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/driver/mysql/MysqlConnectionCredentialsOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ export interface MysqlConnectionCredentialsOptions {
*/
readonly ssl?: any;

}
/**
* Database socket path
*/
readonly socketPath?: string;
}
3 changes: 2 additions & 1 deletion src/driver/mysql/MysqlDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,8 @@ export class MysqlDriver implements Driver {
password: credentials.password,
database: credentials.database,
port: credentials.port,
ssl: options.ssl
ssl: options.ssl,
socketPath: credentials.socketPath
},
options.acquireTimeout === undefined
? {}
Expand Down

0 comments on commit 8d7afaf

Please sign in to comment.