Jump to content

Remote sql problem


padje

Recommended Posts

I am not able to connect to the database remotely. Am I using the right details?

Database url string: jdbc:mysql://padje.heliohost.org:3306/padje_spieladb
User: Cpanel username
Password: Cpanel password

I copied the username and password directly from my password manager so I am quite sure that is not the problem.

When trying to connect I get this exception:

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
Link to comment
Share on other sites

The host name for remote MySQL should be johnny.heliohost.org. Also, remote MySQL needs to be enabled in cPanel first.

Thank you for your answer, I changed the hostname but I still can not connect. I added the access host "%" and my own public ip to thw access hosts, is that enough to enable the remote MySql?

Link to comment
Share on other sites

You are getting this error because you are trying to access the mysql from your local computer. So to enable use of mysql from local computer you need to add a ip address to remote mysql. As remote mysql allow only certain ip address to connect with, by default it is blocked. If you want to allow connection from any ip address, you need to enter a wild card entry. In that case you can use %.%.%.% and save the remote mysql ip. Now try to connect to database.

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...