-
-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecated library's warning using Amazon RDS mysql over ssl #363
Comments
Hi @carlok , thanks for report! This needs to be fixed on the library side. Unfortunately tls is currently not covered with tests so issues like this are not very visible |
mysqljs/mysql@4b59612#commitcomment-5445205 related code in node-mysql: There is quite a bit of code to support node 0.10 - maybe it's a good time to drop support for node below < 0.12? ( It would still likely work on 0.10 if ssl not used ). Need to check current 0.10 usage |
Well, IMHO if you are trying to use node-mysql2 (promises etc) then there is a very good chance that your node environment is not so old. I know that this is not a statistical answer but I'd drop it anyhow. |
Promises are very optional, and CI matrix still has 0.8 (which is probably very safe to drop) This is end of 2015 - https://semaphoreci.com/blog/2015/12/15/nodejs-version-usage-in-commercial-projects-2015-edition.html |
Thank you for the link. Anyhow, using MySQL on AWS/SSL and getting a warning in the server console for each query is not a nice thing ;-( |
According to https://github.com/nodejs/LTS node 0.10 official end of life is Oct 2016. I guess I'll add code similar to one in node-mysql ( two code branches, pre 0.11 and current node ) and then later remove pre 0.11 code after Oct 2016. Also end of Dec 2016 we'll drop node 0.12 |
I'll try to fix as soon as I have time ( you are welcome to do this as well ;) ) |
Well, October is fine. I can wait. Thanks. I'd help but I think I'm not smart enough. |
Btw "getting a warning in the server console for each query " means that you are likely making new connection on each request ( which is quite cpu and latency expensive, especially with ssl ). Any reason why you are not using connection pool? |
Yes I want to use connection pool but I'm still playing a bit with the library. Maybe I'll write again after having written a more stable/good code. |
ping me if you need any help with that |
Hi,
I get this warning
(node:621) DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
using this code derived from the example in the homepage
Running
node --trace-deprecation
, it seems the deprecation is in one of the following:at PoolConnection._startTLS [as startTLS] (./node_modules/mysql2/lib/connection.js:188:27) at ClientHandshake.handshakeInit (./node_modules/mysql2/lib/commands/client_handshake.js:106:16) at ClientHandshake.Command.execute (./node_modules/mysql2/lib/commands/command.js:38:20) at PoolConnection.Connection.handlePacket (./node_modules/mysql2/lib/connection.js:261:28) at PacketParser.onPacket (./node_modules/mysql2/lib/connection.js:95:66) at PacketParser.executeStart (./node_modules/mysql2/lib/packet_parser.js:44:12) at Socket.<anonymous> (./node_modules/mysql2/lib/connection.js:97:29) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:177:18)
Is it possible to fix it (your side or me as a user)? Thanks.
The text was updated successfully, but these errors were encountered: