Search code examples
mysqldatabaseserverovh

Where I can get my adress server name in OVH?


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


Solution

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