loopback-connector-mysql
loopback-connector-mysql copied to clipboard
Switch from `mysql` to `mysql2`
https://www.npmjs.com/package/mysql2
seems like mysql2 has a bump in performance.
MySQL client for Node.js with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression, ssl
I ran test suite and seems to pass.
Hi @8secz-johndpope, there is no particular reason. The connector was created before mysql2 even existed, we haven't had bandwidth to look for alternative drivers and evaluate if it's worth switching.
From what I remember, dealing with types like Date, Time and DateTime can be tricky, especially regarding the timezones. Does mysql2 handle time-related types the same way as mysql?
Our main issue with mysql is lack of support for new authentication protocols introduced by MySQL version 8 (see https://github.com/mysqljs/mysql/issues/2002). It would be a great reason for switching if mysql2 supported them. I am not sure if that's the case though - see https://github.com/sidorares/node-mysql2/issues/991, https://github.com/sidorares/node-mysql2/issues/906 and related issues.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Fixed with https://github.com/loopbackio/loopback-connector-mysql/pull/484