Sup, so first, I want to achieve a simple thing, select a database using the “USE” command and then check if the database is selected with “SELECT DATABASE() FROM DUAL;” command.
The issue is that it does not select, and when I try to execute any query related to the database it says “400, No database selected”
Yes, the database is fully operational, works fine with phpMyAdmin and also works fine using the console itself to execute the commands that are shown in the script
The connection itself is the mysql Pool, outside from that there is nothing, I mean nothing uses the connection except the one I sent. And Session is just a class, if you want I can explain what it is.
That is when the connection is created, those values are the normal ones, port is the default, and the other ones are credentials.
So really important, the “mysql.createPool” function returns a pool, normally you would use this pool for doing the query, since well it looks the same as the other one I am going to mention BUT THEY ARE NOT, the connection you actually want to use is the one that is given to you after you create the Pool, this one:
Using the normal pool won’t work even tho it looks like it should.