Java / MySQL connection

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by cs413pro, Jan 8, 2016.

  1. cs413pro

    cs413pro New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi all, I'm trying to access a MySQL database I've set up on my account using java however I'm having problems whenever I try to connect.

    The code in java I have is:
    Connection conn = DriverManager.getConnection("jdbc:mysql://cs413project.x10host.com:3306/cs413pro_db", "username", "password");

    username and password are filled in, I've just removed them for this post.
    The error I get is:

    java.sql.SQLException: Access denied for user 'username'@'host86-160-72-196.range86-160.btcentralplus.com' (using password: YES)

    I'm at a stump as how to fix this and would appreciate any help.
     
  2. bdistler

    bdistler Well-Known Member Prime Account

    Messages:
    3,534
    Likes Received:
    196
    Trophy Points:
    63
    not sure what you are doing BUT...
    Java is not enabled on x10hosting's free-hosting accounts

    due to the large security risk - x10hosting's free-hosting accounts do not have remote MySQL database access (both incoming and outgoing from the account) - x10hosting's firewall blocks all remote database access
     
  3. cs413pro

    cs413pro New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm not using x10hosting's free package. I upgraded today to premium hence why I was able to create a MySQL database. Is remote database access also blocked for premium members?

    Thanks
     
  4. bdistler

    bdistler Well-Known Member Prime Account

    Messages:
    3,534
    Likes Received:
    196
    Trophy Points:
    63
    no - you might need to open a support ticket to get it setup for your account
     
    • Like Like x 1
  5. cs413pro

    cs413pro New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have went ahead and opened a ticket, thank you for your help.
     

Share This Page