Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

CumulusMX MySQL DB

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

Post Reply
User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

CumulusMX MySQL DB

Post by PaulMy » Sat 01 Dec 2018 7:23 pm

I have an existing DB which include Monthly, Dayfile and realtime tables and these are being updated from my Cumulus 1.

Now would like to also have CumulusMX update MySQL and as I understand these tables have the default Monthly, Dayfile and Realtime viewtopic.php?f=27&t=12908&start=15#p107639
Can I just set the table names in CumulusMX settings as MonthlyMX, DayfileMX and RealtimeMX to avoid overwriting the existing tables?


Thanks,
Paul

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: CumulusMX MySQL DB

Post by mcrossley » Sun 02 Dec 2018 12:41 pm

Yes, that should work - you will need to run each pf the "create tables" buttons after saving the new table names.

What I would do though (if you want to preserve your Cumulus 1 data into MX) is to "copy" your existing tables including the data to the new table names. Then all you need to do is amend the table names in MX. It will then append to your historic data in the copied tables

User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: CumulusMX MySQL DB

Post by PaulMy » Sun 02 Dec 2018 8:12 pm

I have tried to create these new tables and after CumulusMX indicates 'Attempting create' then quickly a 'parsererror' and MXdiags shows

Code: Select all

2018-12-02 14:36:05.329 CREATE TABLE MonthlyMX (LogDateTime DATETIME NOT NULL,Temp decimal(4,1) NOT NULL,Humidity decimal(4,0) NOT NULL,Dewpoint decimal(4,1) NOT NULL,Windspeed decimal(4,1) NOT NULL,Windgust decimal(4,1) NOT NULL,Windbearing VARCHAR(3) NOT NULL,RainRate decimal(4,1) NOT NULL,TodayRainSoFar decimal(4,1) NOT NULL,Pressure decimal(6,2) NOT NULL,Raincounter decimal(6,1) NOT NULL,InsideTemp decimal(4,1) NOT NULL,InsideHumidity decimal(4,0) NOT NULL,LatestWindGust decimal(5,1) NOT NULL,WindChill decimal(4,1) NOT NULL,HeatIndex decimal(4,1) NOT NULL,UVindex decimal(4,1),SolarRad decimal(5,1),Evapotrans decimal(4,1),AnnualEvapTran decimal(5,1),ApparentTemp decimal(4,1),MaxSolarRad decimal(5,1),HrsSunShine decimal(3,1),CurrWindBearing varchar(3),RG11rain decimal(4,1),RainSinceMidnight decimal(4,1), WindbearingSym varchar(3),CurrWindBearingSym varchar(3),PRIMARY KEY (LogDateTime)) COMMENT = "Monthly logs from Cumulus"
2018-12-02 14:36:06.424 Error encountered during MySQL operation.
2018-12-02 14:36:06.425 Can't connect to MySQL server on 'localhost' (10061):
No connection could be made because the target machine actively refused it 127.0.0.1:3306
I am already successfully doing a couple of ImportCumulusFile.php from my Cumulus 1 files and have used the settings from this in CumulusMX MySQL settings Server details:
Host name: changed default '127.0.0.1' to 'localhost' which is the same as in the working ImportCumulusFile.php
Port: using the default '3306'
User name: the same as in the working ImportCumulusFile.php
Password: the same as in the working ImportCumulusFile.php
Database: the same as in the working ImportCumulusFile.php
I have stopped CumulusMX after saving the settings and then restart and try to create..

I note that the the MXDiags on the last 2 lines shown above refer to 'local'host' and then on next line also 'because the target machine actively refused it 127.0.0.1:3306'
When I go to my MySQL webserver database where the existing tables are and select Monthly in the top header it shows as string -
Server: localhost:3306 >>Database: xxxx >>Table: Monthly "Monthly log"
the Database: xxxx shows the actual database name as in the ImportCumulusFile.php and CumulusMX settings.

I can't see it but could I have some settings wrong?

Thanks,
Paul

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: CumulusMX MySQL DB

Post by mcrossley » Sun 02 Dec 2018 8:39 pm

Localhost will resolve to 127.0.0.1 so that is nothing to worry about.

Is CMX actually running on the same server as the database?

User avatar
PaulMy
Posts: 1730
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis Vantage Pro 2+ w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: CumulusMX MySQL DB

Post by PaulMy » Sun 02 Dec 2018 8:42 pm

No, my DB is remote on my GoDaddy webserver.

Paul

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: CumulusMX MySQL DB

Post by mcrossley » Sun 02 Dec 2018 8:52 pm

Ah, so you will have to use your host name rather than localhost. Same as FTP.
You may find that you also have to add your home IP to the allowed remote access list on the DB.

Post Reply