Skip to content

Commit a88ab17

Browse files
Merge pull request #142 from Sebastian-Webster/138-expose-socket-pathname-after-database-creation
Expose socket on database creation
2 parents 72bfa67 + 228f4ff commit a88ab17

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ The port that MySQLX is listening on
8686
The database that was created on database initialization
8787
- `username: string`
8888
The name of the user to use to login to the database
89+
- `socket: string`
90+
If on Windows, this is the name of the named pipe that MySQL is listening on. If not on Windows, this is the path to the socket that MySQL is listening on.
91+
- `xSocket: string`
92+
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on.
8993
- `stop: () => Promise<void>`
9094
The method to stop the database. The returned promise resolves when the database has successfully stopped.
9195

src/libraries/Executor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ class Executor {
173173
resolve({
174174
port,
175175
xPort: mySQLXPort,
176+
socket,
177+
xSocket,
176178
dbName: options.dbName,
177179
username: options.username,
178180
stop: () => {

types/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export type ExecuteFileReturn = {
5353
export type MySQLDB = {
5454
port: number,
5555
xPort: number,
56+
socket: string,
57+
xSocket: string,
5658
dbName: string,
5759
username: string,
5860
stop: () => Promise<void>

0 commit comments

Comments
 (0)