Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Problem with connect to MySQL

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
Shamy
Posts: 27
Joined: Sat 07 Nov 2015 7:53 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Krotoszyn

Problem with connect to MySQL

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12778
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with connect to MySQL

Post 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.
Nossie
Posts: 364
Joined: Tue 16 Aug 2022 8:01 pm
Weather Station: Ecowitt 2551
Operating System: Raspberry Pi5 Debian Bookworm
Location: Stewarton, East Ayrshire UK
Contact:

Re: Problem with connect to MySQL

Post 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
Last edited by Nossie on Wed 08 Mar 2023 7:39 pm, edited 2 times in total.
Ian.

http://www.StewartonWeather.com
Containerised Cumulus[MX] 3.28.0 (build: 3269) ● CumulusUtils Version 6.23.0● Ecowitt 2551/WH65/T&HP/WH57/WH45/3x WH51 ● Pi 5 8GB ● Debian Bookworm ● Ubuntu Server Host
User avatar
mcrossley
Posts: 12778
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with connect to MySQL

Post by mcrossley »

Also 8080 would be an unusual port number - is that correct?
User avatar
mcrossley
Posts: 12778
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with connect to MySQL

Post by mcrossley »

Nossie wrote: Wed 08 Mar 2023 7:35 pm that hostname does not look right to me :-/
True!
Shamy
Posts: 27
Joined: Sat 07 Nov 2015 7:53 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Krotoszyn

Re: Problem with connect to MySQL

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12778
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with connect to MySQL

Post by mcrossley »

As above, that is not an internet resolvable server name, it looks like an instance name, possibly?
User avatar
mcrossley
Posts: 12778
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Problem with connect to MySQL

Post by mcrossley »

What do you get from the (?) on the "server address"?
Nossie
Posts: 364
Joined: Tue 16 Aug 2022 8:01 pm
Weather Station: Ecowitt 2551
Operating System: Raspberry Pi5 Debian Bookworm
Location: Stewarton, East Ayrshire UK
Contact:

Re: Problem with connect to MySQL

Post 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:
Ian.

http://www.StewartonWeather.com
Containerised Cumulus[MX] 3.28.0 (build: 3269) ● CumulusUtils Version 6.23.0● Ecowitt 2551/WH65/T&HP/WH57/WH45/3x WH51 ● Pi 5 8GB ● Debian Bookworm ● Ubuntu Server Host
Shamy
Posts: 27
Joined: Sat 07 Nov 2015 7:53 pm
Weather Station: Davis Vantage Pro 2
Operating System: Windows 10
Location: Krotoszyn

Re: Problem with connect to MySQL

Post by Shamy »

Ohhh ;( Thanks @Nossie
Post Reply