Garikai
Garikai

Reputation: 425

Is it possible to seamlessly connect to a MySQL database hosted on 000webhost.com from a JavaSE application?

I uploaded a MySQL database on the above mentioned site containing some user account information for a small project I'm undertaking. The goal is to allow each client application to connect to the database and retrieve information relevant to the user. Is it possible to do this with this or any other free database hosting website and if so how?

Upvotes: 0

Views: 109

Answers (2)

DeathJack
DeathJack

Reputation: 615

Yes. It is possible to connect to any mySQL database until and unless the site you mentioned as provided you with the following :

1) JDBC Driver 
2) Password and Username  
3) URL to DB

Read the instructions and build your application as needed : [http://www.000webhost.com/forum/][1]

And as Neville K pointed out, such hosting is quite vulnerable and your application might be susceptible to sniffing.

Upvotes: 0

Neville Kuyt
Neville Kuyt

Reputation: 29639

Please do not do this.

MySQL connections are not encrypted by default; anyone who can sniff your client's network traffic can read everything that goes across the wire (including usernames and passwords for your database). If you are storing personal data (which your question suggests), that data is vulnerable.

Sniffing network traffic is one of the easiest attacks - anyone on a public WiFi network is vulnerable.

I do not know if 000webhost.com allows you to connect to the MySQL database from "outside" - you should contact their support team. I'm guessing not, though.

Finally - please read the FAQ on here - asking for tools or services is off topic.

Upvotes: 2

Related Questions