0

I was trying to connect to MySQL database in Flutter application using sqljocky5 using the below code using dart language

void getInfo () async {
    var pool = new ConnectionPool(
        host: 'localhost',
        port: 3305,
        user: 'root',
        password: 'mysql',
        db: 'smartlender',
        max :5
    );
    print('test');
    var results = await pool.query('SELECT employee.firstName  FROM smartlender.employee;'); // exception is thrown here
    results.forEach((row){  // for each loop to add data to the list created above
      names.add(row[0].toString());
    }); 

Then I received this exception: I have working connection to MySQL database and the query is exiting without an error . I appreciate a lot if someone could resolve this issue .

piet.t
  • 11,718
  • 21
  • 43
  • 52
dinith jayabodhi
  • 531
  • 2
  • 8
  • 19

1 Answers1

1

Isn't it default Mysql port number 3306?

Serdar Polat
  • 3,992
  • 2
  • 12
  • 12