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

Database external on Synology NAS or Provider

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
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Database external on Synology NAS or Provider

Post by HansR »

I have MariaDB 10 on a synology NAS, name password port (3307) etc... is all OK.
I can access the database by PhpMyAdmin and defined the server to be '%'.

However, I still can not access the database through Cumulus which is running on my RPi.
I have a similar situation when working with the database on my provider account.

CMX says:

Code: Select all

Parse error.
The logfile says:

Code: Select all

MySQL Create Table: Error encountered during MySQL operation.
Can't connect to MySQL server on 'ip-address' (10061): Connection refused
So anybody similar experiences? Do I have to do something with the port (and if so where)? Do I miss something obvious?
Last edited by HansR on Fri 12 Feb 2021 4:50 pm, edited 1 time in total.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
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: Database on Synology NAS

Post by mcrossley »

Have you granted access from your pi's hostname to the account you use to log in? By default only "localhost" is permitted.
sutne
Posts: 577
Joined: Sun 14 Oct 2012 4:23 pm
Weather Station: HP2560 (WS80) and HP2550 (WS90)
Operating System: Raspbian Bullseye and Bookworm
Location: Rjoanddalen and Kronstad, Norway
Contact:

Re: Database on Synology NAS

Post by sutne »

Providers does not always allow remote sql-access:
viewtopic.php?p=144019#p144019
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Database on Synology NAS

Post by HansR »

mcrossley wrote: Fri 12 Feb 2021 2:24 pm Have you granted access from your pi's hostname to the account you use to log in? By default only "localhost" is permitted.
I gave access to 'HansR'@'%' that should be enough isn't it?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
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: Database on Synology NAS

Post by freddie »

sutne wrote: Fri 12 Feb 2021 2:50 pm Providers does not always allow remote sql-access
This is a MariaDB installation on Hans' LAN so the provider is not involved.

@HansR: have you commented out the "bind-address" line in your MariaDB configuration? Typically it is in /etc/mysql/mariadb.conf.d/50-server.cnf
Freddie
Image
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Database on Synology NAS

Post by HansR »

sutne wrote: Fri 12 Feb 2021 2:50 pm Providers does not always allow remote sql-access:
viewtopic.php?p=144019#p144019
Yes, I guess that is true so I asked them for a solution. But it could be that it is something more general so I asked here as well.
And see my previous answer to @mcrossley for how I defined the user.

@freddie: yes but @sutne refers to my remark about my installation on my provider site. So his response is relevant as well.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
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: Database on Synology NAS

Post by mcrossley »

HansR wrote: Fri 12 Feb 2021 3:05 pm
mcrossley wrote: Fri 12 Feb 2021 2:24 pm Have you granted access from your pi's hostname to the account you use to log in? By default only "localhost" is permitted.
I gave access to 'HansR'@'%' that should be enough isn't it?
And did you change the server binding from 127.0.0.1 ?
https://www.digitalocean.com/community/ ... s-to-mysql
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Database on Synology NAS

Post by HansR »

And @sutne your solution requires a daily copy of the datafiles and a daily run of the import script.
I at most regard that as an intermediate solution because CMX can fill in the records in realtime so I go for the live db connection ;)
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: Database on Synology NAS

Post by HansR »

mcrossley wrote: Fri 12 Feb 2021 3:08 pm
HansR wrote: Fri 12 Feb 2021 3:05 pm
mcrossley wrote: Fri 12 Feb 2021 2:24 pm Have you granted access from your pi's hostname to the account you use to log in? By default only "localhost" is permitted.
I gave access to 'HansR'@'%' that should be enough isn't it?
And did you change the server binding from 127.0.0.1 ?
https://www.digitalocean.com/community/ ... s-to-mysql
OK:
  1. On the Synology you go to

    Code: Select all

    /var/packages/MariaDB10/etc
    and create the file my.cnf.
  2. Edit the file (very likely you have to use vi) and add the line

    Code: Select all

    bind-address = *
But then (it is really shamefully simple :!: :oops: ) you click on MariaDB icon in the package centre (or on the desktop wherever you put it) and tick :

Code: Select all

Enable TCP/IP Connection
(see image). That does the trick.
    Schermafbeelding 2021-02-12 164244.png

    As the standard installation does not have the bind line in the default cnf files I am not sure the above my.cnf is required. Next time I would just try the tick of the TCP/IP connection and see what happens. ;) If that does not work you can always create the my.cnf

    I'll get back on the remote server issue.
    You do not have the required permissions to view the files attached to this post.
    Hans

    https://meteo-wagenborgen.nl
    CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
    BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
    sutne
    Posts: 577
    Joined: Sun 14 Oct 2012 4:23 pm
    Weather Station: HP2560 (WS80) and HP2550 (WS90)
    Operating System: Raspbian Bullseye and Bookworm
    Location: Rjoanddalen and Kronstad, Norway
    Contact:

    Re: Database on Synology NAS

    Post by sutne »

    HansR wrote: Fri 12 Feb 2021 3:25 pm And @sutne your solution requires a daily copy of the datafiles and a daily run of the import script.
    That is done by a cron job each night (same as the cumulusutils thrifty job ;) ).
    But I must admit the 1. of each month I have to change the name of the file to be imported in crontab.
    User avatar
    HansR
    Posts: 6926
    Joined: Sat 20 Oct 2012 6:53 am
    Weather Station: GW1100 (WS80/WH40)
    Operating System: Raspberry OS/Bookworm
    Location: Wagenborgen (NL)
    Contact:

    Re: Database on Synology NAS

    Post by HansR »

    sutne wrote: Fri 12 Feb 2021 4:35 pm That is done by a cron job each night (same as the cumulusutils thrifty job ;) ).
    But I must admit the 1. of each month I have to change the name of the file to be imported in crontab.
    Well, CumulusUtils has the added functionality/data combination of course ;)

    But anyway, that name change is a bit awkward I think. I will try to get the info on the external database at the provider out as well such that everybody can make use of it. My guess is it is only the permittance of the port through the firwall(s) and the provider has to set MariaDB for the server-binding.We will see. It works fine now with the NAS so why not with the provider 8-) (true, i can think of some arguments)

    Should be great to have it all running without having to think about it every first of the month ;)
    Hans

    https://meteo-wagenborgen.nl
    CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
    BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
    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: Database external on Synology NAS or Provider

    Post by mcrossley »

    How are you uploading the file? If you use CMX Extra Files, then you could upload to the same remote filename all the time.
    User avatar
    HansR
    Posts: 6926
    Joined: Sat 20 Oct 2012 6:53 am
    Weather Station: GW1100 (WS80/WH40)
    Operating System: Raspberry OS/Bookworm
    Location: Wagenborgen (NL)
    Contact:

    Re: Database external on Synology NAS or Provider

    Post by HansR »

    btw... what happens if the database is out of the air for some time?
    Does Cumulus catch up one way or another or is that the responsibility of the user to keep the database in sync with the logfiles?
    Hans

    https://meteo-wagenborgen.nl
    CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
    BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
    Post Reply