任何人都知道如何使用MYSQL工作台将MYSQL连接到android studio。我尝试了所有方法,但显示以下错误。
com.mysql.jdbc.CommunicationsException: Communications link failure due to
underlying exception:
01-17 16:21:56.845 30367-30442/animaltracking.kevell.com.myapplication
W/System.err: ** BEGIN NESTED EXCEPTION **
01-17 16:21:56.845 30367-30442/animaltracking.kevell.com.myapplication
W/System.err: java.net.SocketException
01-17 16:21:56.845 30367-30442/animaltracking.kevell.com.myapplication
W/System.err: MESSAGE: java.net.ConnectException: Connection refused
答案 0 :(得分:1)
您可以使用以下链接通过使用其余的Web服务或Web服务来连接第三方数据库:-
链接:-https://www.youtube.com/watch?v=Ucs-blvF3d8&t=1096s
注意:-使用Volley或Volley plus,Retrofit,HttpOk
答案 1 :(得分:0)
您不应该这样做。相反,您应该使用REST API与数据库进行通信。
https://android.jlelse.eu/consuming-rest-api-using-retrofit-library-in-android-ed47aef01ecb