I'm trying to connect to mysql localhost database in flutter. I do realize that this is not recommended but it's for a VERY minor project so I don't want to go through the struggle of using APIs. I tried using mysql1 package and when i run i get: Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 34486 I am not using an emulator. I tried changing the host to 10.0.2.2 and i got: Unhandled Exception: SocketException: Connection timed out, host: 10.0.2.2, port: 3306

0 Answers