We have installed XDevAPI for Mysql connector in nodejs. We are trying to connect Mysql server from Nodejs using 3306 port. But we were unable to connect Mysql and it throws error like,
"server gone away".
Actually Node XDevAPI's default port is 33060. So we need to change the port from 33060 to 3306 in Nodejs ?. Is it possible? Pls help me.
[Duplicate of another answer of mine]
Port 3306 defaults to the classic MySQL Wire Protocol. The MySQL X DevAPI Connector for Node.js only supports the X Protocol, which is implemented by the X Plugin (by default on port 33060).
You can change this by updating the mysqlx_port server variable or using the --mysqlx-port= option when starting the server. If you want to use the X Protocol on port 3306 though you will also have to update the port variable or use a different value with the --port= option when starting the server.
Disclaimer: I'm the lead developer of the MySQL X DevAPI Connector for Node.js