HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mysqljs
mysql
JavaScript2010–2022
mysqljs / mysql

mysql

A pure node.js JavaScript Client implementing the MySQL protocol.

9Distinct people
9Mentions
0Explicit recommenders
18.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A pure node.js JavaScript Client implementing the MySQL protocol.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2010-11-12 07:11:53 UTC to 2022-03-06 23:33:29 UTC.

0122010-01-01 00:00:00 UTC to 2011-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20102011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20102010-01-01 00:00:00 UTC2011-01-01 00:00:00 UTC110
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC000
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC202
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC110
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC101
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC101
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202

What Hacker News says

9 sources
As a security professional, I was horrified to find out that the maintainers don't consider this a security issue, though they did promise to take this seriously and change the API when they were made aware of it in 2014 (https://github.com/mysqljs/mysql/issues/731). So I bumped an issue, noting this is all over HN, and offered to write a pull request for the API change proposed by the maintainers: https://github.com/mysqljs/sqlstring/issues/60 Doug agreed to accept such a request, so I just sat down to figure out the code and a reasonable upgrade plan. Three hours later, I could already write Doug this email (pasting it here because the issue and codebase are locked to non-contributors so I had to send it via email): OK, I have a draft pull request ready. Of course, it's a big change and I expect to get a lot of feedback and have a few r
Read the rest
ounds of back and forth and fixups before it is accepted. This is the plan as I envision it: * Release SqlString 3.0.0 that has a new allowObjectValues parameter defaulting to false. This is a new major, so it shouldn't break anybody's code. * Release mysqljs 2.19.0 (or should it be 2.18.3 for even higher adoption?) that depends on SqlString 3.0.0 but explicitly passes allowObjectValues on every call to it,with a default of true unless the user explicitly set it to false. This is a non-breaking change. This version will also add a deprecation warning whenever a ConnectionConfig is built without explicitly setting allowObjectValues, warning that the default will change in 3.0 and suggesting to set it to false unless it's needed and highlighting the need to typecheck values if it's set to true. * Release mysqljs 3.0 that changes the default and removes the deprecation warning, so new projects get a sane default. This involves, of course, changes to two repositories, so here they are (I can't open pull requests because I have not contributed in the past): https://github.com/SonOfLilit/sqlstring https://github.com/SonOfLilit/mysql (I didn't write the mysqljs3.0 patch yet to make pull request technicalities simpler, but it's trivial) Again, I'm new to this project, am not a javascript developer in my day job, and I expect - and am prepared to handle - nontrivial amounts of feedback and requests for improvement. For a brighter, safer future :-), Aur
In Finding an authorization bypass on my own website
Looking at the dependencies, I realized that it is now common to implement database bindings purely in the host language (vs. using vendor provided C/C++ SDK.) Deno PG [1] and MySQL [2] does it. This makes sense considering Deno's security model. But Node libs do the same [3][4]! This also kinda make sense, as node-based JS has to be async most of the time. Still it's such a hassle. Anyways, kudos to both communities. You've done a lot! - [1] https://deno.land/x/postgres@v0.11.2 - [2] https://deno.land/x/mysql@v2.9.0 - [3] https://github.com/brianc/node-postgres/tree/master/packages... - [4] https://github.com/mysqljs/mysql
In DenoDB
If your security strategy relies on one or two security controls, you're doomed most of the time. We've added SQL filtering as a defense-in-depth measure, having a convenient seat in the architecture, complementing every other mitigation measure proper application developers and DBAs should be doing (and frequently get wrong). Even ORMs get bypassed once in a while: - https://github.com/mysqljs/mysql/issues/342 - https://github.com/sequelize/sequelize/issues/5671 - (okay, we can avoid this one by saying nothing "nothing proper exists in NodeJS world) https://bertwagner.com/2018/03/06/2-5-ways-your-orm-will-all... Dumb concatenation can nullify the merit of quite advanced ORM: copybook example of misusing Ruby's ActiveRecord (is that proper enough) got as far as OWASP testing guide: https://www.owasp.org/index.php/Testing_for_ORM_Injection
Read the rest
_(O... Prepared statements are cooked wrong as well, but rarely, that's why they are viable line of defense, but not the sole one (as nothing should be): https://www.reddit.com/r/netsec/comments/ww9qm/sqli_bypassin... https://stackoverflow.com/questions/134099/are-pdo-prepared-... (in fact, I've seen with my eyes exactly what first comment in reddit postmentions).
In Preventing SQL Injections When WAF’s Not Enough
At my company(we are small just 2 devs), I decided to go down the Node route, because why not, the project I just got off of was a lot of client javascript(with Play framework) and it made sense. This was the end of 2011. I was looking for something to replace Play framework because the impending doom of Play 2.0(which ended up being terrible..for us). We started writing stuff in Node using the node mysql, and ran into a few issues(https://github.com/felixge/node-mysql/issues/200), that were resolved really fast. As I got into it more and writing more business logic it started to fall apart. The async nature really started to show it's face. The async library was awesome in helping with taming the callbacks . When you want to execute queries in series, iterate over data, manipulate the data coming in and then write some data to a csv
Read the rest
, it's just not pretty. The code looked good, and it was all in really small functions, but making sense of order of execution with callbacks flying all over the place proved difficult. It was possible definitely but if you looked at the logic in Java, it was just like a big sigh of relief. Not sure how to explain it but looking at code that executes like you think it would makes me happier. Luckily we didn't have too many projects done in Node and switched to Rails 6 months after and have been happy ever sense. I've revisited Node a few times, but even with generators it makes certain things blah. Specifically looping through arrays that need to execute callback code. I really, really want to like Node.JS, but it's just not there for me. For me both languages on the client and server is overrated anyway and with Angular I'm writing less Javascript then I ever have.
In Why Node.js is becoming the go-to technology
The topic was the non-existence of drivers in other platforms, you brought quality up. Node itself isn't 1.0 yet. I don't see how not having anything is better than having something in development. transloadit.com, from the module mantainers, has been using it for an year+. I don't have any magic insight into what modules sites use, but judging from the activity in their repo it's quite popular (~1000 watchers, 100+ forks): https://github.com/felixge/node-mysql
In Vert.x – JVM Polyglot Alternative to Node.js

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.