[nodemon] 2.0.7
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node ./bin/www.js
events.js:292
throw er; // Unhandled ‘error’ event
^
Error: Connection lost: The server closed the connection.
at Protocol.end (D:\nodestudy\blog-1\node_modules\mysql\lib\protocol\Protocol.js:112:13)
at Socket. (D:\nodestudy\blog-1\node_modules\mysql\lib\Connection.js:94:28)
at Socket. (D:\nodestudy\blog-1\node_modules\mysql\lib\Connection.js:526:10)
at Socket.emit (events.js:327:22)
at endReadableNT (_stream_readable.js:1201:12)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted ‘error’ event on Connection instance at:
at Connection._handleProtocolError (D:\nodestudy\blog-1\node_modules\mysql\lib\Connection.js:423:8)
at Protocol.emit (events.js:315:20)
at Protocol._delegateError (D:\nodestudy\blog-1\node_modules\mysql\lib\protocol\Protocol.js:398:10)
at Protocol.end (D:\nodestudy\blog-1\node_modules\mysql\lib\protocol\Protocol.js:116:8)
at Socket. (D:\nodestudy\blog-1\node_modules\mysql\lib\Connection.js:94:28)
[… lines matching original stack trace …]
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
fatal: true,
code: ‘PROTOCOL_CONNECTION_LOST’
}
[nodemon] app crashed - waiting for file changes before starting…
老师 我这个报错怎么解决 吶