• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

connecting to Datatbase from different Pcs

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ahmed Shalotut
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ahmed Shalotut
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ahmed Shalotut
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Henry Wong
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Ahmed Shalotut
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic