I am currently trying to setup a database connection between my server (command line server) and my localhost xampp mysql. this is running in my main function:
main() async {
var pool = new ConnectionPool(
host: 'localhost', port: 1234,
user: 'root', password: 'password',
db: 'angularsite', max: 5);
var results = await pool.query("select * from discussions");
results.forEach((row) {
print('Row: ${row}');
});
}
As you can see, it's basically the example that sqljocky provides. I just replaced the credentials with mine. I don't get an error message, nothing happens. From using the good old print method I know that the execution of the code doesn't go beyond the "pool.query" line. (The ConnectionPool does indeed instanciate)
Anything I did wrong?
Thanks in advance