Android Question Connection of B4A to cPanel (phpmyadmin) database

I'm new in using B4A and my only problem is to connect b4a to my database in cpanel. (there is no problem if im using xampp localhost).

Thanks for the help
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
#DATABASE CONFIGURATION
DriverClass=com.mysql.jdbc.Driver
JdbcUrl=jdbc:mysql://(IP ADDRESS OF MY HOSTING)/starlan1_sms?characterEncoding=utf8
User=databaseusername
Password=databasepassword
#Java server port
ServerPort=2083 (im using 2083 because it is remote)

is this correct?
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I can connect it even if it is online web hosting ?
It depends on the host. Maybe your host is online, but just let connect to the database from a web page inside the same host, not allow it from another webpage or external service.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

barx

Well-Known Member
Licensed User
Longtime User
Most hosts (especially shared hosts) do not allow directc connection from outside to MySQL DB. Some will allow you to specify certain IP's to allow connection.

The only real work around i know of is to create an API in PHP.
 
Upvote 0
probably not. You need to check with your Provider.

Correct me if I'm wrong sir I'm still new in mobile applications.

Using B4A there is no such way to connect my application in my web hosting like cPanel which it has also phpmyadmin?

The only way is to connect it to the PC server that has JRDC and it is 24/7 online to connect my apps in the database?

Thanks please help me in this matter
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Using B4A there is no such way to connect my application in my web hosting like cPanel which it has also phpmyadmin?
They are not related to mobil apps.

Install your own php-scripts will do the trick. You can communicate with your php-scripts using okhttputils2. Search the forum; there are some Tutorials.

A direct db-connection is most probably not possible with your Provider (as the most providers prevent this)..

The best solution (#4) is jrdc2 (but you need a Server (not hosting) or VPS to be able to run it).
 
Upvote 0
Top