Jump to content

Recommended Posts

Posted

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.
Posted

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

Posted

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?

Posted

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.

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...