Hello,
According to https://www.b4x.com/android/forum/threads/sql-tutorial.35185/ this tutorial I downloaded the connector
added additionaljar and now I am trying to connect to database (local mysql database , because b4j app will run on the same serfver with mysql )
To connect tutorail says :
sql1.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test?characterEncoding=utf8")
my database name is admin_ahmet and username is admin_ahmet password is xxx
I tried :
this returns me:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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.
Where is my mistake ?
Thanks
According to https://www.b4x.com/android/forum/threads/sql-tutorial.35185/ this tutorial I downloaded the connector
added additionaljar and now I am trying to connect to database (local mysql database , because b4j app will run on the same serfver with mysql )
To connect tutorail says :
sql1.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/test?characterEncoding=utf8")
my database name is admin_ahmet and username is admin_ahmet password is xxx
I tried :
B4X:
Dim username,password As String
username="admin_ahmet"
password="xxx"
' timerayarla
sql1.Initialize("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/admin_ahmet" &";user=" & username & ";password=" & password)
this returns me:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: 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.
Where is my mistake ?
Thanks