How to connect mysql to node js using XDevAPI connector with 3306 port

给你一囗甜甜゛ 提交于 2020-01-16 09:03:29

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!