I am trying to connect dart with a MySQL database But I'm getting this Error: Unsupported operation: RawSocket
import 'dart:async';
import 'package:mysql1/mysql1.dart';
Future main() async {
// Open a connection (testdb should already exist)
final conn = await MySqlConnection.connect(ConnectionSettings(
host: 'localhost', port: 3306, user: 'root', db: 'testdb'));
var results = await conn
.query('select * from sample');
for (var row in results) {
print('${row[0]}');
}
// Finally, close the connection
await conn.close();
}