[Logo]
Forums Register Login
connecting to Datatbase from different Pcs
please, I need to know if it is possible to connect MySQL database from another PC in the same LAN or maybe throw the internet
do I need to pay for this?
can I do it throw Xampp?  and how?
please, I need urgent help in that.

so again I need to connect one database using MySql from different Pcs from java code (JDBC).
what do I need to do?

Why shouldn't it work? The JDBC interface is designed for network access. The MySql driver supports access via machine name (or IP) and port.  And if memory serves, the JDBC driver should be using TCP, so it should route over the internet too.

Henry
 

Henry Wong wrote:
Why shouldn't it work? The JDBC interface is designed for network access. The MySql driver supports access via machine name (or IP) and port.  And if memory serves, the JDBC driver should be using TCP, so it should route over the internet too.

Henry



I tried to connect from my other Pc using my IP and the port number but it didn't work and always threw exception
 

Ahmed Shalotut wrote:
I tried to connect from my other Pc using my IP and the port number but it didn't work and always threw exception



... and I assume that you don't feel comfortable with Databases and Networking to debug it? Well, that is what the ranch is for... just ... TellTheDetails.

Henry
 

Henry Wong wrote:

Ahmed Shalotut wrote:
I tried to connect from my other Pc using my IP and the port number but it didn't work and always threw exception



... and I assume that you don't feel comfortable with Databases and Networking to debug it? Well, that is what the ranch is for... just ... TellTheDetails.

Henry


look what I meant is that I am trying to remote connect my database using my IP address from another Pc but I don't know what is wrong.
what should I do to make it work
but I don't have problems with coding or debugging.
maybe I didn't get what you said as well.
 

Henry Wong wrote:

Ahmed Shalotut wrote:
I tried to connect from my other Pc using my IP and the port number but it didn't work and always threw exception



... and I assume that you don't feel comfortable with Databases and Networking to debug it? Well, that is what the ranch is for... just ... TellTheDetails.

Henry


java.sql.SQLException: null,  message from server: "Host 'Name' is not allowed to connect to this MariaDB server"

there is the exception
(1 like)
 

Ahmed Shalotut wrote:
what should I do to make it work
but I don't have problems with coding or debugging.
maybe I didn't get what you said as well.



Apologies. We do get a lot of users asking for help with debugging. If you don't need help with that, then, no worries.

As for the exception, it is most likely a privileges issue... but I will leave you to debug that.

Henry
 

Henry Wong wrote:

Ahmed Shalotut wrote:
what should I do to make it work
but I don't have problems with coding or debugging.
maybe I didn't get what you said as well.



Apologies. We do get a lot of users asking for help with debugging. If you don't need help with that, then, no worries.

As for the exception, it is most likely a privileges issue... but I will leave you to debug that.

Henry



You are super 😁 just done with it thanks
Destiny's powerful hand has made the bed of my future. And this tiny ad:
Download Free Java APIs to Work with Office Files and PDF
htttp://www.e-iceblue.com/free-apis.html


This thread has been viewed 422 times.

All times above are in ranch (not your local) time.
The current ranch time is
Dec 13, 2018 00:26:19.