Android Question RDC config.properties MariaDB

luke2012

Well-Known Member
Licensed User
Longtime User
Hi All,
I'm trying to configure RDC framework (by @Erel) to connect a MariaDB database server.

The MariaDB database server is running within a machine with private IP (ex. 192.168.1.XX)
I not sure that the jdbc configuration is ok (see belove):

B4X:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.
DriverClass=org.mariadb.jdbc.Driver
JdbcUrl=jdbc:mariadb://192.168.1.XX/test?characterEncoding=utf8

So my target is to set RDC to connect to the remote database server (MariaDB).

Thanks in advance for your help :)
 

luke2012

Well-Known Member
Licensed User
Longtime User
Why are you using RDC instead of jRDC2?

So assuming to use JRDC2 (https://goo.gl/EbV8rr), I think that the jdbc configuration is the same as old RDC framework correct?

B4X:
#Lines starting with '#' are comments.
#Backslash character at the end of line means that the command continues in the next line.
DriverClass=org.mariadb.jdbc.Driver
JdbcUrl=jdbc:mariadb://192.168.1.XX/test?characterEncoding=utf8
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
both works don.

in my jRDC's i use this:

B4X:
JdbcUrl=jdbc:mysql://localhost/myDatabase?characterEncoding=utf8&useSSL=false&useUnicode=true

The db server is a MariaDB version. So I suppose that the JdbcUrl should be a "jdbc:mariadb..." instead of "jdbc:mysql...". Correct ?
 
Upvote 0

luke2012

Well-Known Member
Licensed User
Longtime User
All Done! I did the jRDC2 setup:

RemoteServer is running (03/07/2018 16:53:19)
Error fetching connection.

Within the b4j log I read an error:

B4X:
java.sql.SQLException: Host 'DESKTOP-ICOQJHD.fritz.box' is not allowed to connect to this MariaDB server

Why this? It seem that the MariaDB Server has an internal security that block the machine that called the test handler (http://localhost:17178/test)...

Note that the MariaDB server and jRDC server are running on different VMs (and IPs).
 
Last edited:
Upvote 0

OliverA

Expert
Licensed User
MySQL, and most likely MariaDB, are configured initially to only accept access from the same server and block all outside access. Google is your friend in this case. Make sure your user is also set up to allow log ins from outside the server that the db is running on.
 
Upvote 0
Top