New home, new database

52 views
Skip to first unread message

Liz

unread,
Jan 3, 2020, 2:59:52 AM1/3/20
to weewx-user
I have moved house, and intend to start a new database for weeWx and
uradmon extension for the new place.

How would I best set up new databases? I'm using MariaDB on Debian and use
the apt system for install of the base system.

Liz

Thomas Keffer

unread,
Jan 3, 2020, 8:40:14 AM1/3/20
to weewx-user
I assume you intend to use the same MariaDB server?

If so, you have two choices:

1. Rename your existing database from "weewx" to something else. WeeWX will notice the missing database and create a new one.

2. Configure weewx.conf to use a new database. For example, 

[DataBindings]

    [[wx_binding]]
        # Point the wx_binding to the new database:
        database = archive_new
        # The name of the table within the database
        table_name = archive
        # The manager handles aggregation of data for historical summaries
        manager = weewx.wxmanager.WXDaySummaryManager
        # The schema defines the structure of the database.
        # It is *only* used when the database is created.
        schema = schemas.wview.schema
[Databases]

# The old database
[[archive_mysql]]
database_name = weewx
database_type = MySQL
    # Define a new database
[[archive_new]]
database_name = weewx_new
database_type = MySQL
Of course, you will also have to set the necessary permissions for the new database.
Of the two options, #2 is probably the right way to go.
-tk


--
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 weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/09cec5ac8acd2a4c09088d87764a9891.squirrel%40www.billiau.net.
Reply all
Reply to author
Forward
0 new messages