Closed emre13k closed 2 years ago
Please make sure you can access you database. You can check it using telnet or console mysql client or whatever you like
I can access my db using console.
mysql> select * from deneme.sehirler where id=1; +----+-------+ | id | name | +----+-------+ | 1 | adana | +----+-------+ 1 row in set (0.01 sec)
mysql>
Hm. Maybe same as here? https://github.com/zim32/mysql.dart/issues/11
it can be but ı don't know how can ı change. do you know?
Try to connect to mysql from console, restart flutter app and check if issue still exists
if I use my phone ip: Unhandled Exception: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 192.168.1.100, port = 54336
if I use my pc ip: Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed E/flutter (26589): E/flutter (26589): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets
but if I use emulator and using 10.0.2.2 in the host it working.
I want to use my phone what shold ı do.
You want to connect from your phone to what? Where is mysql server?
Also check that you have Internet permission in your app
mysql server is in my pc
My app has a internet permission in the androidmanifest.xml
When I use emulator its working but not working in my phone
What exception you got when trying from your phone?
if I write to host: "127.0.0.1"
I/flutter (15314): Connecting to mysql server... E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = 127.0.0.1, port = 32768
if I write to host: "192.168.1.103" //pc ip
I/flutter (15314): Connecting to mysql server... E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed E/flutter (15314): E/flutter (15314): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets
As I understand you phone and PC are in the same wifi network. And your mysql server is listening on 0.0.0.0 address (not 127.0.0.1)?
As I understand you phone and PC are in the same wifi network. ---> yes And your mysql server is listening on 0.0.0.0 address (not 127.0.0.1)? ---> I don't know
You must find listen directive in your mysql config file and make sure it is set to 0.0.0.0
where can I find this
What operation system?
windows 10
There should be my.ini or my.cfg file in mysql directory. You can read official mysql documentation
I didn't find anything. the problem will be something else ı guess
Can you try release 0.0.15 There was some fix, maybe your problem depends on that issue
Possible duplicate of https://github.com/zim32/mysql.dart/issues/16
E/flutter (13703): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: TimeoutException after 0:00:05.000000: Future not completed E/flutter (13703): E/flutter (13703): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Exception: MySQL error: Got timeout reading communication packets
its the error code using example. can anyone help me about this?