sidorares / sidorares/node-mysql2
unable to end the mysql connection using the mysql2 promise
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
Followings are my piece of code, please have a look into it.
var mysql = require('promise-mysql');
var connection;
mysql.createConnection({host:'Ip', user:'qa', password: '******'}).then(function(conn){
connection = conn;
return connection.query(firstInput);
})
.then(function(rows){
console.log(rows);
})
.then(function(){
console.log("End of DB Con.");
return connection.end();
})
.catch(function(error){
//logs out the error
console.log(error);
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue only provides a JavaScript promise-mysql connection chain; no repository file, test, or entry point is named. Start by reproducing the connection and end sequence from the example, then inspect the mysql2 promise connection API and existing connection-close tests if present. Done means the reported inability to end the connection is reproduced, explained, and covered by a passing regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mysql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100