0

Hello i have made a chat app in nodejs and it works fine on my machine but when i try it on my vps it always stops running when it try's to connect to the database this is the error log i get

root@server:/etc/init.d# node /NodeJS/ChatServer/server.js
Server has started trying to connect to Database
Connection to Database has been made
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Connection lost: The server closed the connection.
    at Protocol.end (/NodeJS/ChatServer/node_modules/any-db-mysql/node_modules/mysql/lib/protocol/Protocol.js:103:13)
    at Socket.<anonymous> (/NodeJS/ChatServer/node_modules/any-db-mysql/node_modules/mysql/lib/Connection.js:102:28)
    at Socket.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)
HyperGainZ
  • 75
  • 1
  • 10

0 Answers0