sidorares / sidorares/node-mysql2
SET NAME uft8mb4 loop when doing querys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.4k
- Forks
- 680
- Avg merge
- 9h 7m
- Merged PRs (30d)
- 59
Description
I followed the first query example and it's not working and not giving any errors. Maybe it's because my database is on a different port than default.
My code
const mysql = require('mysql2');
const connection = mysql.createConnection(
{
host: 'database host',
port: '6033',
user:'clippie',
password:'clippe password',
database: 'clippie',
}
);
connection.query(
'SELECT * FROM questions',
function(err, results){
if(err) throw err;
console.log('getting questions');
console.log(results);
});
I tested this with mysql package and worked like it should but for what i'm maknig i need prepared statements what mysql not supports.
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
Start by reproducing the provided mysql2 createConnection and SELECT query using port 6033, then compare its behavior with the mysql package. Check whether the query callback receives results or an error, and document the cause and a reproducible resolution for the connection loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100