Skip to content

Commit f6b31a4

Browse files
update check message and kill MySQL if X is not initialised when forced
1 parent 0b2eee5 commit f6b31a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libraries/Executor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,15 @@ class Executor {
220220
return //Promise rejection will be handled in the process.on('close') section because this.killedFromPortIssue is being set to true
221221
}
222222

223-
const xStartedSuccessfully = file.includes('X Plugin ready for connections')
223+
const xStartedSuccessfully = file.includes('X Plugin ready for connections') || file.includes("mysqlx reported: 'Server starts handling incoming connections'")
224224

225225
if (options.xEnabled === 'FORCE' && !xStartedSuccessfully) {
226226
this.logger.error('Error file:', file)
227227
this.logger.error('MySQL X failed to start successfully and xEnabled is set to "FORCE". Error log is above this message. If this is happening continually and you can start the database without the X Plugin, you can set options.xEnabled to "ON" or "OFF" instead of "FORCE".')
228+
const killed = await this.#killProcess(process)
229+
if (!killed) {
230+
this.logger.error('Failed to kill MySQL process after MySQL X failing to initialise.')
231+
}
228232
return reject('X Plugin failed to start and options.xEnabled is set to "FORCE".')
229233
}
230234

0 commit comments

Comments
 (0)