Page 1 of 1
Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:15 pm
by Shamy
Hi, I want to connect to a MySQL database in order to show the sun hours in the sunplot graphic.
I created such a database in my provider's admin panel (OVH.com) and there is a problem because Cumulus returns an error:
"Error: Unable to connect to any of the specified MySQL hosts."
the problem is that all data are entered correctly, I can normally log in to the database via a browser and PhpMyAdmin...
settings.jpg
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:34 pm
by mcrossley
By default, most MySQL logins do not allow remote login, it is something you have to configure either when you create the user, or afterwards by altering the login details directly.
Also, the MySQL instance itself may have a setting that disables remote login globally.
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:35 pm
by Nossie
that hostname does not look right to me :-/
and as an FYI remote login hostnames can be different
EDIT: to add to what Mark said, default port for mysql is 3306
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:36 pm
by mcrossley
Also 8080 would be an unusual port number - is that correct?
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:36 pm
by mcrossley
Nossie wrote: ↑Wed 08 Mar 2023 7:35 pm
that hostname does not look right to me :-/
True!
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:44 pm
by Shamy
Okay, I changed port to 3306.
The rest is entered correctly, 100%. From control panel:
mysql.jpg
I haven't seen an option to set up a remote connection - although the connection to the database is established through php scripts
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:56 pm
by mcrossley
As above, that is not an internet resolvable server name, it looks like an instance name, possibly?
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 7:57 pm
by mcrossley
What do you get from the (?) on the "server address"?
Re: Problem with connect to MySQL
Posted: Wed 08 Mar 2023 8:11 pm
by Nossie
Shamy - I haven't looked into this much but I did find this that concerns me with what you are trying to do.
https://stackoverflow.com/questions/617 ... ame-in-ovh
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:
Re: Problem with connect to MySQL
Posted: Thu 09 Mar 2023 9:03 am
by Shamy
Ohhh ;( Thanks @Nossie