AnatolyUss / nmig

NMIG is a database migration tool, written in Node.js and highly inspired by FromMySqlToPostgreSql.
GNU General Public License v3.0
451 stars 83 forks source link

'mysql' dependency does not support the default Auth flow of newer MySql versions #92

Closed Reloflex closed 2 years ago

Reloflex commented 2 years ago

After executing the steps from the readme, I've came across an issue where the script failed to connect to my local MySql instance. After some investigation I came to the conclusion that the 'mysql' library does not support the default connection method of the MySql 8.0+ instances. I've found a detailed and timestamped description of the issue in the following Stackoverflow post's second answer:

StackOverflow question that has a detailed aswer

Based on the info from that post, I would suggest to swap out the 'mysql' dependency for the similarly popular 'mysql2'.

AnatolyFromPerion commented 2 years ago

Resolved. Thank you @Reloflex for your PR!