0

On OVH they gave me a server name servername.mysql.db.

Can't I have an adresse like '127.0.0.1' for localhost ? Is this the real server adress that I have to use ?

I have this stack trying to connect

java.net.UnknownHostException: Unknown host (isthmejjozinho.mysql.db)

Here's a screenshot of my OVH page...

enter image description here

2
  • 1
    Why not ask OVH directly? They would know best about this
    – Nico Haase
    Commented May 12, 2020 at 11:19
  • There is a IPV4 on my main page. I tried with this but I have a "connexion refused"...
    – jozinho22
    Commented May 12, 2020 at 11:25

1 Answer 1

2

From where are you trying to connect to this database ?

This database is on a private network, accessible only from your OVH WebHosting offer through OVH internal DNS.

As OVH WebHosting offer can only host PHP apps, and as the error message you are providing seems to be a Java one, I suppose you are trying to connect to this database from outside your WebHosting offer, which cannot work.

If you need a database accessible from everywhere, you need an OVH CloudDB, not a private DB as you currently have.

Also note that it is really advised to use the hostname of your database, and not the IP directly, as it can change over the time, as stated in your OVH Manager:

Please use the host name provided to connect to your instance, as the IP address associated with it may change over time.

2
  • Yes, I was trying to access db from a java project.
    – jozinho22
    Commented May 14, 2020 at 8:59
  • Is this Java project hosted outside your WebHosting offer ? If so, what you need is a Cloud Database: ovh.com/fr/cloud-databases It is accessible with a public IP / public domain, from everywhere even outside OVH Network
    – Pierre
    Commented May 14, 2020 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.