{"action":"created","issue":{"url":"https://api.github.com/repos/felixge/node-mysql/issues/1337","repository_url":"https://api.github.com/repos/felixge/node-mysql","labels_url":"https://api.github.com/repos/felixge/node-mysql/issues/1337/labels{/name}","comments_url":"https://api.github.com/repos/felixge/node-mysql/issues/1337/comments","events_url":"https://api.github.com/repos/felixge/node-mysql/issues/1337/events","html_url":"https://github.com/felixge/node-mysql/issues/1337","id":130099732,"number":1337,"title":"\"The server closed the connection\"","user":{"login":"Rexota","id":1625294,"avatar_url":"https://avatars.githubusercontent.com/u/1625294?v=3","gravatar_id":"","url":"https://api.github.com/users/Rexota","html_url":"https://github.com/Rexota","followers_url":"https://api.github.com/users/Rexota/followers","following_url":"https://api.github.com/users/Rexota/following{/other_user}","gists_url":"https://api.github.com/users/Rexota/gists{/gist_id}","starred_url":"https://api.github.com/users/Rexota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rexota/subscriptions","organizations_url":"https://api.github.com/users/Rexota/orgs","repos_url":"https://api.github.com/users/Rexota/repos","events_url":"https://api.github.com/users/Rexota/events{/privacy}","received_events_url":"https://api.github.com/users/Rexota/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-31T08:17:50Z","updated_at":"2016-02-02T22:09:05Z","closed_at":null,"body":"`{ [Error: Connection lost: The server closed the connection.] fatal: true, code: 'PROTOCOL_CONNECTION_LOST' }`\r\n\r\nI'm getting this error constantly. Why? Here is my connection class:\r\n\r\nvar mysql      = require('mysql')\r\n\r\n```\r\nvar db_config = {\r\n  host     : '127.0.0.1', user     : 'root',  database : 'db',  password : 'pw'\r\n}\r\n\r\nmodule.exports = connection\r\n\r\nvar pool  = mysql.createPool(db_config)\r\n\r\npool.getConnection(function(err, connection) {\r\n  console.log(\"getConnection:\", err, connection)\r\n});\r\n\r\nmodule.exports = pool\r\n```\r\nI tried with createConnection too but still same. I read the README.md#pooling section but I didn't understand anything. Are there any guide etc? (If not, I'll have to move whole back-end to PHP.)\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/felixge/node-mysql/issues/comments/178853711","html_url":"https://github.com/felixge/node-mysql/issues/1337#issuecomment-178853711","issue_url":"https://api.github.com/repos/felixge/node-mysql/issues/1337","id":178853711,"user":{"login":"Rexota","id":1625294,"avatar_url":"https://avatars.githubusercontent.com/u/1625294?v=3","gravatar_id":"","url":"https://api.github.com/users/Rexota","html_url":"https://github.com/Rexota","followers_url":"https://api.github.com/users/Rexota/followers","following_url":"https://api.github.com/users/Rexota/following{/other_user}","gists_url":"https://api.github.com/users/Rexota/gists{/gist_id}","starred_url":"https://api.github.com/users/Rexota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rexota/subscriptions","organizations_url":"https://api.github.com/users/Rexota/orgs","repos_url":"https://api.github.com/users/Rexota/repos","events_url":"https://api.github.com/users/Rexota/events{/privacy}","received_events_url":"https://api.github.com/users/Rexota/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T22:09:05Z","updated_at":"2016-02-02T22:09:05Z","body":"Still searching for a permanent solution. "}}