Hi there
I hope someone can help me. I have followed Erel's tutorial on configuring B4A and B4J jRDc2 for connecting to a remote MySQL database. This is what I did:
On jRDC B4J
Edited config.properties
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://My-VPS-IP-Address/exampleDB?characterEncoding=utf8
User=root
Password=********
#Java server port
ServerPort=17178
Also:
Compiled jRDC and built standalone package
On the VPS:
On B4A
The problem is when I run http://160.119.254.12:17178/test, I get the following error:
RemoteServer is running (02/06/2023 08:36:18)
Error fetching connection.
Please help!!
I hope someone can help me. I have followed Erel's tutorial on configuring B4A and B4J jRDc2 for connecting to a remote MySQL database. This is what I did:
On jRDC B4J
Edited config.properties
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://My-VPS-IP-Address/exampleDB?characterEncoding=utf8
User=root
Password=********
#Java server port
ServerPort=17178
Also:
B4X:
#AdditionalJar: mysql-connector-java-5.1.47-bin
Compiled jRDC and built standalone package
On the VPS:
- Installed MySQL
- Created exampleDB test database
- Created user with root access and granted all privileges
- Edited mysqld.cnf to allow all IP's to connect - changed from 127.0.0.1 to 0.0.0.0
- Opened ports 3306 and 17178 on the firewall
- Confirmed that both 3306 and 17178 ports are listening
- Copied compiled jRDC file to VPS in the folder where my exampleDB is located
- Ran nohup /usr/lib/jvm/java-11-openjdk-amd64/bin/java -jar /var/lib/mysql/jrdc.jar & > nohup.out & successfully
On B4A
B4X:
Private const rdcLink As String = "http://160.119.254.12:17178/rdc"
The problem is when I run http://160.119.254.12:17178/test, I get the following error:
RemoteServer is running (02/06/2023 08:36:18)
Error fetching connection.
Please help!!