Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

MySQL problems

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
griffo42
Posts: 247
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

MySQL problems

Post by griffo42 »

Hi

I am running CumulusMX version b3148. My website is: kstwx.net/cumx/index.htm.

freddie wrote: ↑
Mon Sep 27, 2021 4:22 pm
Have you looked at your user table in mysql to check that user kstwx197 is permitted to access the database from the host on which MX is running? In the user table you have columns Host and User. You should have a row where your kstwx197 user is listed against the IP address or hostname of the MX host. If this row is present then you need to look at whether the user has been granted insert privileges on the Cumulus tables.

I have looked at all of the above suggestions and look OK to me given that the RealtimeTable is being updated every minute or so. This seems to be too often to me.

The wiki area that I looked at seems to indicate that I can change the MySQL settings from the settings pages of the settings dropdown in the dashboard: I can't find that. The only thing that I can find which relates to MySQL is a page in which the 3 tables can be created. In relation to my MySQL issues (see below), these are the MySQL entries in my cumulus.ini file:

[MySQL]
Host=xxxx
Port=xxxx
User=xxxx
Pass=xxxx
Database=xxxx
MonthlyMySqlEnabled=1
RealtimeMySqlEnabled=1
DayfileMySqlEnabled=1
MonthlyTable=monthlycumx
DayfileTable=dayfilecumx
RealtimeTable=realtimecumx
RealtimeRetention=7Days
CustomMySqlSecondsCommandString=
CustomMySqlMinutesCommandString=
CustomMySqlRolloverCommandString=
CustomMySqlSecondsEnabled=0
CustomMySqlMinutesEnabled=0
CustomMySqlRolloverEnabled=0
CustomMySqlSecondsInterval=10
CustomMySqlMinutesIntervalIndex=6
RealtimeMySql1MinLimit=1
UpdateOnEdit=1
BufferOnFailure=0

With the above settings, these are an example of the errors that are reported in my MXDiags file every 5 minutes:

2021-10-02 17:20:02.898 DoLogFile: Error encountered during MySQL operation = Unknown column 'Humidex' in 'field list'
2021-10-02 17:20:12.826 Realtime[140]: Error encountered during MySQL operation = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
2021-10-02 17:21:13.846 Realtime[142]: Error encountered during MySQL operation = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
2021-10-02 17:22:13.788 Realtime[144]: Error encountered during MySQL operation = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
2021-10-02 17:23:13.909 Realtime[146]: Error encountered during MySQL operation = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

Advice as to how fix the above errors and lengthen the update schedule as well as any other advice and/or recommended additions to the cumulus.ini entry cited above will be much appreciated.

best wishes
Keith
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MySQL problems

Post by freddie »

The errors you list are totally different to the errors you reported last week, which threw me for a bit. You must've fixed the earlier error as there is no way you could get your current errors without addressing the previous ones.

MySQL settings are in the interface under Settings->MySQL settings. I wouldn't go hacking around in Cumulus.ini unless you're sure you know what you're doing.

The Realtime table is there for real-time data, so a frequent update is to be expected - mine updates every two seconds.
The Monthly table is where you record periodic data - most use an update interval of 5-10 minutes on this table.
The Dayfile table is where you store data that summarises a 24-hour period.

Your particular error is indicating that there is a missing column in your database table - Humidex. I would address this error first before adjusting any settings.
Freddie
Image
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MySQL problems

Post by freddie »

I've just taken a look at your web site and notice that you have data going back 10 years. There was an update to MX in August 2020 that introduced Humidex - which meant extra columns in monthly files and dayfile, and extra columns to add to database tables. This thread contains some discussion on the change.
Freddie
Image
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: MySQL problems

Post by mcrossley »

The changes were...

Dayfile table:
- MaxHumidex - decimal(5,1)
- TMaxHumidex - varchar(5)

Monthly table:
- Humidex - decimal(5,1)
griffo42
Posts: 247
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: MySQL problems

Post by griffo42 »

Thanks Freddie and Mark for your replies. All is good now after having deleted the 3 tables that I had previously installed in my database and started again. I am now getting no errors in my MXDiags file.

Could I indulge you with a related problem? I am unable to find the correct syntax to use to have your (Mark) MySQL utility to populate the tables with my historical data. I am running Win10 home. There is no exe/bat/etc file in the download to run.

Thanks

Keith
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: MySQL problems

Post by freddie »

You need to download the ExportToMySql utility from https://github.com/cumulusmx/ExportToMy ... v1.3.0.zip

The utility should be placed in your MX installation location.

Example syntax to use can be found at https://github.com/cumulusmx/ExportToMy ... /README.md
Freddie
Image
jlmr731
Posts: 227
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Wickliffe, Ohio
Contact:

Re: MySQL problems

Post by jlmr731 »

First did you make a backup of your table before you deleted them? if so you can import them into your new tables.

You can also use Marks export to mysql utility found here https://cumuluswiki.org/a/Software#ExportToMySQL and this next link should help you run the utility https://github.com/cumulusmx/ExportToMy ... /README.md

I was sniped by freddie
griffo42
Posts: 247
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: MySQL problems

Post by griffo42 »

Thanks @freddie and @jlmr731.

Thanks for directing me to those 2 posts. I had read them and tried many combinations to ge them to run with no result. I have tried the "run" command and also the command prompt to follow this instruction - "The utility must be run from your Cumulus MX root folder (the folder that holds your CumulusMX.exe file).". The results from attempting to do so are:
Screenshot 2021-10-05 134135.jpg
Thanks for any help you can provide.

Keith
You do not have the required permissions to view the files attached to this post.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: MySQL problems

Post by ConligWX »

did you extract the files from the zip archive?

you should have two files within the zip.

ExportToMySQL.exe
ExportToMySQL.exe.config
griffo42
Posts: 247
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: MySQL problems

Post by griffo42 »

Thanks to all who advised me on this problem. All good.

Keith
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
Post Reply