SCS SCS - 29 days ago 24
Java Question

Accessing mysql database server from another computer?

we just started learning about sql statements and such, and right now i am totally confused on how to do this:

I need to access the database of another computer (we are using mysql workbench) using java codes

What i have done so far:


  • grant all privileges using '%'

  • i can already connect to the database (mysql) in my own computer (java codes and jdbc)



my problems are:

what are the steps do i need to do to be able to access the database from another computer, there are no direct answers in google...and now i am totally confused on how to do this because every site keep on telling me about cpanel, which i dont know how to have one...then this remote access that requires me to change my sql server configuration, i dont know how to find this...

CAN SOMEONE GIVE ME A STEP BY STEP SETTING/SETUP i need to do, to be able to access the database/connection from another computer? i only need the Normal steps, no need for safety/security setups and descriptive steps, i can do the rest of specific research on Google

SOLUTION

SCS SCS
Answer

Just run the the mysql in one device then get that device Ip address, then on the other device use the http://IPADDRESS:8081/yourWebsite

for example instead of instead of http://localhost:8081/yourWebsite = http://271.1.1.10:8081/yourWebsite

it will work from there, not need to configure anything. the other device will be using the same project and same database

note both devices should be on the same network