问题
I installed XDevAPI for connecting mysql and nodejs. but it throw error like "The server gone away" because i am using 3306 port. how to solve this.
回答1:
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
来源:https://stackoverflow.com/questions/58317151/how-to-connect-mysql-to-node-js-using-xdevapi-connector-with-3306-port