Joachim:
Cleaning up bad data in your MySQL database can be done using a SQL editor.
I used DBeaver (dbeaver.io) which is a universal database manager. It will
connect to MySQL, SQLite, and MariaDB (which is what I use for WeeWX) and a
lot of other databases.
This is what i would do:
1. Download dbeaver from dbeaver.io and set it up on your workstation
2. in DBeaver, under Database, select new connection. Provide the host name
and port (I believe it is 3306) of the mySQL Server instance and login with
the same login that you are using with WeeWX.
3. Open a new SQL Script window by clicking on SQL Editor->New SQL Script.
Ensure you select the connection and database above.
4. Now using the Bad Data wiki, find the errant record by querying the
archive table in the database. The SQLite commands should work as both
databases are SQL99 compliant.
5. Before you delete any rows, dump the database to a file. you can do that
with DBeaver by clicking on the connection, navigate to the database, right
click on the database and select dump database. See screenshot for details.
6. delete the row by finding the dateTime value you want to remove and use
that in your WHERE Clause. You can use the keyword FROM_UNIXTIME to convert
the dateTime value to a real date. here is an example:
select FROM_UNIXTIME(dateTime) , windGust from archive;
Let me know if that helps
On Thu, Jan 13, 2022 at 5:44 PM vince <[email protected]> wrote:
>
> When you picked mysql you essentially signed up for learning more on your
> own.
>
> See if https://www.mysqltutorial.org/mysql-update-data.aspx helps you any
> in figuring out the mysql command to do something similar to what the wiki
> sqlite3 example is doing.
>
> On Thursday, January 13, 2022 at 2:25:46 PM UTC-8 [email protected]
> wrote:
>
>> I have tried the instruction "old 'bad' data" . But I use the
>> mysql-database. To convert the DB ( 1 million records) to a sqlite-DB was
>> not succesfull.
>> Furthermore run here 2 instances, so no weewx.conf or weewx db but with
>> other names ( ecowitt.conf with weewx_eco db etc).
>>
>> Joachim
>>
>> gjr80 schrieb am Donnerstag, 13. Januar 2022 um 11:31:40 UTC+1:
>>
>>> Hi,
>>>
>>> Have you worked through the Cleaning up old 'bad' data wiki page
>>> <https://github.com/weewx/weewx/wiki/Cleaning-up-old-'bad'-data> with
>>> an emphasis on the field windSpeed? You most likely do not see the
>>> spikes on the Seasons year plots as the Seasons year plots plot a day
>>> average value, perhaps you are seeing the spikes on the Belchertown plots
>>> because they plot a different aggregate (or perhaps no aggregate at all).
>>>
>>> Gary
>>>
>>> On Thursday, 13 January 2022 at 19:44:56 UTC+10 [email protected]
>>> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> how can i delete the two peaks in the berlchertown year chart?
>>>> These peaks do not appear in the season year diagram.
>>>> [image: wind-belchertown.png][image: wind-season.png]
>>>> Joachim
>>>>
>>> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/dd279948-9e2f-43d3-88ca-be017b753eecn%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/dd279948-9e2f-43d3-88ca-be017b753eecn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Thanks,
Doug Jenkins
Phone: 813.391.5686 | [email protected] | www.dougjenkins.com
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/CACC0i0xuYk%2BdGbE%2B2wxidRgDbqCt987Sb4eXHs9hPso%3DSWooMA%40mail.gmail.com.