Open RedSpid3r opened 1 year ago
When you pass an existing pool or connection object to the MySQLStore
constructor, the module will not create a new pool internally - it will use the one that you provided. So the database-related options (e.g. database
) will not be used. Create a new pool object with the other database name and then pass that to the constructor.
I am trying to using my existing connection pool with express-mysql-session, however, in doing so i am unable to specify the database name.
My app connected to multiple databases which is why I am not setting database name in mysql2
createPool
options.this results in:
Is there a way to make this work or do i need to keep using 2 separate connection pools?