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

ExportToMySQL error

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
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

ExportToMySQL error

Post by AndyKF650 »

Hi there

I just had cause to run the ExportToMySQL.exe to update MYSQL tables following a couple of days hiatus from my hosting company HostPresto.

The dayfile update worked with no issues at all but the monthly update sprang the following error message at the start of the process but then went through to complete the update.

My question is this an error on my side or is it an issue with the .exe script. I am running the v1.80.0 script with CMX 3.25.1 b3244


andyk@raspberrypi:~/CumulusMX $ sudo mono ExportToMySQL.exe monthly
Parameter: monthly
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
23-05-26 07:50
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: ExportToMySQL error

Post by mcrossley »

Are you saying that the monthly import seems to have worked?

Can you try importing a single monthly file and see if you get the same error.

The logging for ExportToMySQL is minimal to say the least so there is no real clue where the error is happening. Note to self - add more logging to the next build!
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

Re: ExportToMySQL error

Post by AndyKF650 »

Hi Mark

I just reran the whole test again with a single month, monthly and dayfile parameters. Whilst they all appeared to work the error showed up on the monthly test only.

The attached file shows the cmd line screen shot from my RPi.
You do not have the required permissions to view the files attached to this post.
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: ExportToMySQL error

Post by mcrossley »

Could you post the monthly file you used please?
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

Re: ExportToMySQL error

Post by AndyKF650 »

Hi Mark

Do you really want the whole monthly files from the beginning of time or 4 years ago! As far as I know the monthly parameter just runs all the monthly files present on the data base.
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: ExportToMySQL error

Post by mcrossley »

I thought you also ran against a single month and still got the error?
AndyKF650
Posts: 818
Joined: Thu 20 Aug 2020 8:35 am
Weather Station: Davis VP2 Plus
Operating System: RPiv5B 64bit Linux 12 Bookworm
Location: Jersey Channel Islands
Contact:

Re: ExportToMySQL error

Post by AndyKF650 »

Hi Mark

It was only the monthly parameter that gave the error. The dayfile and single month parameters worked with no errors as I mentioned the other day.
I just reran the whole test again with a single month, monthly and dayfile parameters. Whilst they all appeared to work the error showed up on the monthly test only
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: ExportToMySQL error

Post by mcrossley »

Ah, so it is likely just one of your files that has errors in it.

There will need to be a new version of ExportToMySQL for the next release of CMX, so I'll add more verbose logging of what is going on to enable you to track down the issue...
Post Reply