Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
node-mysql2 dialect not supporting password usage #341
When trying to connect to a MySQL database by using the newly added node-mysql2 dialect, it is not possible to connect to a database using a password.
Reason: I researched a bit myself in the repository and have seen that the used connection method within Knex.js' mysql2 dialect is using 'user', 'database' and 'connection' property only:
Is there any reason for doing so? According to the node-mysql2 description and docs it should be fully API compatible to the node-mysql module, so I'd suggest to just use same .createConnection() call as it is used in Knex' mysql dialect:
I tried it out and now it also did work when using a password for database access...
Many greets, and thanks for the amazing module,
It looked like the reason was that if invalid options were passed, node-mysql2 really didn't seem to like it. I went ahead and picked out all of the options that seemed relevant