You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//As stated in the MySQL X Plugin documentation at https://dev.mysql.com/doc/refman/8.4/en/x-plugin-options-system-variables.html#sysvar_mysqlx_bind_address
201
-
//when the MySQL X Plugin fails to bind to an address, it does not prevent the MySQL server startup because MySQL X is not a mandatory plugin.
202
-
//It doesn't seem like there is a way to prevent server startup when that happens. The workaround to that is to shutdown the MySQL server ourselves when the X plugin
203
-
//cannot bind to an address. If there is a way to prevent server startup when binding fails, this workaround can be removed.
204
-
constkilled=awaitthis.#killProcess(process)
205
-
if(!killed){
206
-
reject('Failed to kill MySQL process to retry listening on a free port.')
207
-
}
208
-
}elseif(file.includes('ready for connections. Version:')||file.includes('Server starts handling incoming connections')){
204
+
if(file.includes('ready for connections')||file.includes('Server starts handling incoming connections')){
209
205
fs.unwatchFile(errorLogFile)
206
+
207
+
this.killedFromPortIssue=file.includes("Do you already have another mysqld server running")
208
+
this.logger.log('Did a port issue occur after watching errorLogFile:',this.killedFromPortIssue)
209
+
if(this.killedFromPortIssue){
210
+
constkilled=awaitthis.#killProcess(process)
211
+
if(!killed){
212
+
returnreject('Failed to kill process after port error.')
213
+
}
214
+
return//Promise rejection will be handled in the process.on('close') section because this.killedFromPortIssue is being set to true
0 commit comments