corrupt mysql?

59 views
Skip to first unread message

Zsolt Máté

unread,
Jan 25, 2022, 2:47:42 AM1/25/22
to weewx-user
Hi everyone

my weewx mysql database is acting weird.

I've logged into phpmysql and I'm getting the following error, no matter what table I'm trying to open

Warning in ./libraries/sql.lib.php#613
 count(): Parameter must be an array or an object that implements Countable

Backtrace

./libraries/sql.lib.php#2128: PMA_isRememberSortingOrder(array)
./libraries/sql.lib.php#2062: PMA_executeQueryAndGetQueryResponse(
array,
boolean true,
string 'weewx',
string 'archive_day_appTemp',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `archive_day_appTemp`',
NULL,
NULL,
)
./sql.php#221: PMA_executeQueryAndSendQueryResponse(
array,
boolean true,
string 'weewx',
string 'archive_day_appTemp',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
string '',
string './themes/pmahomme/img/',
NULL,
NULL,
NULL,
string 'SELECT * FROM `archive_day_appTemp`',
NULL,
NULL,
)

Can anyone help me out to fix this?

Cameron D

unread,
Jan 26, 2022, 4:00:33 AM1/26/22
to weewx-user
Firstly, you would want to rule out that phpMyAdmin is not the problem.
Try the same commands with mysql shell/client or even with mysql workbench on a windows system.

Zsolt Máté

unread,
Jan 26, 2022, 4:32:42 AM1/26/22
to weewx-user
Via console I'm not getting the error.
What I've noticed, my data is missing from the beginning of December until yesterday, when I discovered that my weewx instance was acting weird. The webpage was showing the data, but the css was all messed up.
I decided to reboot my pi, and when I checked the phpmysql I discovered that error and the missing data.
Can confirm, that weewx was working during the previous days. Even measured the Tonga eruption shockwave.

CLI looks like this (truncated).

MariaDB [weewx]> SELECT * FROM `archive_day_altimeter`;
+------------+------------------+------------+------------------+------------+------------------+-------+------------------+---------+
| dateTime   | min              | mintime    | max              | maxtime    | sum              | count | wsum             | sumtime |
+------------+------------------+------------+------------------+------------+------------------+-------+------------------+---------+
| 1546254000 |             NULL |       NULL |             NULL |       NULL |                0 |     0 |                0 |       0 |
| 1546340400 |             NULL |       NULL |             NULL |       NULL |                0 |     0 |                0 |       0 |
| 1546426800 |             NULL |       NULL |             NULL |       NULL |                0 |     0 |                0 |       0 |
| 1546513200 |             NULL |       NULL |             NULL |       NULL |                0 |     0 |                0 |       0 |
| 1546599600 | 29.5787168389751 | 1546668900 | 29.7356344094877 | 1546686000 | 2491.12247214729 |    84 | 747336.741644186 |   25200 |
| 1546686000 | 29.7379600887755 | 1546686900 |  29.897817590659 | 1546772400 | 8586.04835004087 |   288 | 2575814.50501226 |   86400 |
| 1546772400 | 29.8940858215625 | 1546784100 | 30.0371979903682 | 1546853400 | 8630.46742018693 |   288 | 2589140.22605608 |   86400 |
| 1546858800 | 30.0289331555921 | 1546868700 | 30.1481570023865 | 1546920600 |  8670.2210690116 |   288 | 2601066.32070348 |   86400 |
| 1546945200 | 29.5891566447423 | 1547014800 | 30.1157605167892 | 1546945500 | 8593.32919113824 |   288 | 2577998.75734147 |   86400 |
| 1547031600 | 29.7387938229121 | 1547031900 | 29.9388899419505 | 1547118000 | 8587.75150853799 |   288 |  2576325.4525614 |   86400 |
| 1547118000 | 29.9397236755119 | 1547119500 | 30.3299107560163 | 1547201700 | 8674.08376892149 |   288 | 2602225.13067644 |   86400 |
Reply all
Reply to author
Forward
0 new messages