Cumulus MX FAQ: Difference between revisions

4,496 bytes added ,  17:07, 23 May 2020
m
Line 56: Line 56:
# MX needs to read from [[Cumulus.ini]] the earliest date to process as it ignores any content for earlier dates. (Cumulus 1 just read all the files it could find in the data folder.
# MX needs to read from [[Cumulus.ini]] the earliest date to process as it ignores any content for earlier dates. (Cumulus 1 just read all the files it could find in the data folder.
# When you first start running MX, it does not seem to be able to populate charts and recent history web tags for earlier times.
# When you first start running MX, it does not seem to be able to populate charts and recent history web tags for earlier times.
= Problems with Cumulus MX use of MySQL database =
CumulusMX includes in the admin interface the ability to create tables, and to update the tables. It works with both a predetermined schema (tables named realtime, monthly, and dayfile by default), and with a schema chosen by the Cumulus user. The package also includes the executable '''ExportMySQL.exe''' that can add past data to two of the tables (monthly and dayfile).  These features allow people with no knowledge of the Structured Query Language (SQL) to start using databases, and problems are highly likely, see if the advice below helps.
== Questions ===
===What is my database name? ===
Cumulus MX does not create a database. You must have an existing database for MX to create tables. If you don't know how to create a database, don't use this facility. If you have created a database, or your web provider has provide you with a database, then you should know the database names, what user names have what access, and what password is needed.
=== Can I host a database locally? ===
Yes, the uploading that CumulusMX.exe and EXportMySQL.exe does will work on a local web server with a database as well as on a remote web server with a database. There are actually lots of packages that are free and will load Apache to run a web server, MySQL (or another database server) to allow you to use database tables,  and a script language like PHP to allow you to generate web pages showing data from database queries. Then there are several packages that provides an easy way to manipulate a database (if you are using MySQL and PHP, then the most popular [but by no means the only] package has a name formed from those two with Admin added i.e.PHPMyAdmin; similar packages are available for other databases with the second part of name changing).
=== I'm updating my MX version and it says something about new columns ===
Although SQL will work with XML organised language (where each data item is labelled, but also has a relationship with other items), it is most often used with "relational databases". A relational database is defined as one that stores all the information in one or more tables consisting of rows and columns. Furthermore, the order of the columns must be defined by a schema that also states what format is used in each table cell, but the rows can be stored in any order, and the user cannot control that order.
When a table is being updated the SQL normally names the columns that are to be updated. For that update to work the columns must be there, and the number of columns must match the number of values being supplied.  If a particular version of MX adds new columns for the update, then the new columns must be defined and added to the table before the update can run.  The release announcement may provide a SQL script to run to add the new columns, otherwise you need to use whatever administration package is made available by your web server provider. If you have PHP and MySQL, then PHPMyAdmin is one package often provided, but there are several alternatives, that may offer more.
=== I am using Cumulus 1 and I have existing tables, but I want to try MX ===
#If the columns in your existing tables match those used by standard MX tables, then why not copy your existing tables (using a tool like PHPMyAdmin or whatever you have available) perhaps adding a "MX" suffix for the new name.  Then in MX simply declare these table names via the Admin interface MySQL settings page.  Set the host to the relevant name for your remote web server (or a local server), add username, password, alter settings to allow updates to leave your device, and alter settings on your web server to allow the MX device to update the database.  '''Enable''' the relevant updates and MX should add more rows to the tables with your existing data.
#If there are extra columns in the MX schema compared to the schema you were using in Cumulus 1, follow instruction above as far as the necessary settings,  but before you enable the updates either use any script provided in release post for when the extra columns were added, or use whatever administrative tool (it might be phpMyAdmin) is provide to add the extra columns. The enable the updates.
#If you want to use different columns to those MX uses (you don't have solar, or you want snow or extra sensor data to be in  your database) then you need to use the Custom upload facilities that MX provides. To keep this answer short, I won't explain how here.


= Problems with web pages or NOAA reports =
= Problems with web pages or NOAA reports =
5,838

edits