0

I can not connect to MYSQL database (WAMP 3.1.0 x65) from my Android app nor .NET app. within LAN. Remote connections to another MYSQL DB (DEBIAN) via VPN works fine from my apps. Also, I have no problem with connections on Apache and Phpmyadmin from all devices within LAN. I have some changes in conf. files of WAMP, but it does not work anyway.

duracer
  • 19
  • 7
  • You need to allow remote connections in the mysql server configuration, open the mysql port in the firewall and grant remote access to the actual database user inside the mysql server. – arkascha Apr 20 '18 at 09:52
  • I have added bind-address="X.X.X.X' to my.ini, turned off the firewall and created user with all PRIVILEGES from anywere, but it does not work. – duracer Apr 20 '18 at 10:07
  • Test the network level access with a ``telnet`` client: ``telnet mysql`` from another system. Can you connect? – arkascha Apr 20 '18 at 10:14
  • Have you flushed your mysql servers privilige cache after creating the user (or restarted the mysql server)? – arkascha Apr 20 '18 at 10:16
  • telnet's reply: "mysql_native_password"....yes, I have restarted wamp – duracer Apr 20 '18 at 10:36
  • some other recommendations? – duracer Apr 20 '18 at 11:14

2 Answers2

0

In simple terms, I need to connect a developed android app from real device to MYSQL DB on a device with Android Studio.

ANDROID EX: error here 1 : Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."

.NET EX: The underlying provider failed Open.

duracer
  • 19
  • 7
  • This is _not_ an answer, so why do you post it as an answer? There is an `´edit`` button right below your question. _Use it..._ – arkascha Apr 20 '18 at 12:29
  • This reads like a network layer issue, btw. Did you _really_ check the connection from another system, e.g. from the android device? – arkascha Apr 20 '18 at 12:30
  • Android device can connect to Apache and PhpMyAdmin (via Chrome ) on the device with problem DB connection. – duracer Apr 20 '18 at 13:32
  • Both connection habe nothing to do with each other. The connection to the http server uses the http protocol, so different routing and filter rules ate applied. – arkascha Apr 20 '18 at 14:23
0

Remote connection to MYSQL DB is working suddenly!

I did successful remote connection from a command prompt and then both apps connected to DB successfully. Even I don't need "binding-address" in my.ini.

Arkascha Thanks for your attention.

duracer
  • 19
  • 7