+ Reply to Thread
Results 1 to 6 of 6

Thread: Connecting java to mysql via J/connector and ODBC

  1. #1
    jpsietsma is offline x10Hosting Member jpsietsma is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    9

    Connecting java to mysql via J/connector and ODBC

    Any help would be appreciated on this one guys,

    Ok, so I'm trying to connect a JAVA program (not javascript) to a mysql database, but every time I try to connect it returns with the error "could not connect to mysql server at mysql-stoli.x10hosting.com. I also tried it with just plain stoli.x10hosting.com, it returned the same error.

    Could someone please shed some light on the situation?

    Thanks!

    Jimmy

  2. #2
    ah-blabla's Avatar
    ah-blabla is offline x10 Lieutenant ah-blabla is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    375

    Re: Connecting java to mysql via J/connector and ODBC

    I assume you're using the Java program on your own pc (From what I have read there's no Java on X10, at least it isn't listed here)? If so, you can't connect to the X10 MySQL, since remote MySQL access isn't available on free hosting.

  3. #3
    jpsietsma is offline x10Hosting Member jpsietsma is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    9

    Re: Connecting java to mysql via J/connector and ODBC

    Shouldn't I still be able to connect via the mysql OBDC connector though? It wouldn't matter if java was available on the server because it's not java that's communicating, it's communicating through the mysql connector. Nobody else has had this issue?

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Connecting java to mysql via J/connector and ODBC

    Are you saying that you have a java applet running on a webpage and that you want it to communcate with a mySQL database on x10hosting?
    Nothing is always absolutely so.

  5. #5
    ah-blabla's Avatar
    ah-blabla is offline x10 Lieutenant ah-blabla is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    375

    Re: Connecting java to mysql via J/connector and ODBC

    Quote Originally Posted by jpsietsma View Post
    Shouldn't I still be able to connect via the mysql OBDC connector though? It wouldn't matter if java was available on the server because it's not java that's communicating, it's communicating through the mysql connector. Nobody else has had this issue?
    It doesn't matter what is communicating, it matters from where it is communicating. If it isn't running on the server it won't be able to connect to the database, since only internal connections are allowed.

    Quote Originally Posted by descalzo View Post
    Are you saying that you have a java applet running on a webpage and that you want it to communcate with a mySQL database on x10hosting?
    If it is a java applet, then you won't be able to communicate with the X10 db since applets are run client side, and therefore count as external programs, even if they are served on a page on the server. (It is dangerous to allow direct access of applets to a db anyway, you should use a layer in between. You could write something in php to interface from the applet to the db.)
    Last edited by ah-blabla; 10-17-2009 at 03:53 PM.

  6. #6
    jpsietsma is offline x10Hosting Member jpsietsma is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    9

    Re: Connecting java to mysql via J/connector and ODBC

    Ohhh, I see. No it is not an applet, it's a seperate program. Yeah that is the same advice i got on IRC, to set up a php interface for the program to interact with. Thanks Everyone!

+ Reply to Thread

Similar Threads

  1. [PHP] MySQL and PHP
    By Bryon in forum Tutorials
    Replies: 43
    Last Post: 03-24-2011, 07:27 AM
  2. Using Java with MySQL on x10
    By fguy64 in forum Programming Help
    Replies: 24
    Last Post: 06-03-2009, 06:15 PM
  3. Replies: 14
    Last Post: 09-29-2008, 07:07 PM
  4. New Site-Suggestions?
    By mnoutside in forum Review My Site
    Replies: 9
    Last Post: 08-27-2008, 07:01 AM
  5. Connecting to mysql server [Help]
    By vAx1oNe in forum Free Hosting
    Replies: 2
    Last Post: 10-20-2007, 07:59 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers