importing weewx.sql not working

79 views
Skip to first unread message

VE4PER / Andy

unread,
May 17, 2020, 9:07:46 PM5/17/20
to weewx-user
Hello,

I did an export database from old mysql db using phpmyadmin. I copied the weewx.sql file over to the new machine and tried to import data into the empty weewx database using phpmyadmin. I kept getting errors on import; I amend UPLOAD_MAX  POST_MAX to 64MB and also doubled time to 60 from 30 but still generating errors size is 55.4 MB for weewx.sql file;  zipped it is 8.1 MB but neither will import using phpmyadmin.

Tried using mysql command line and all it seems to do is generate command syntax errors. took commands from examples in mysql ref manual for vers 8

I have system down for a number of hours now and unable to get old data in to create the required archive table so info not being sent to remote users. Usually in the past, if I remove /uninstall weewx and then reinstall it from scratch it created the mysql database and tables ; doesn't now though.

Any tips or pointers would be appreciated

Thanks
Andy

Tom Keffer

unread,
May 17, 2020, 9:47:23 PM5/17/20
to weewx-user
Any tips or pointers would be appreciated

My advice is that unless you really require remote access and unless you are an experienced MySQL administrator, stick with sqlite. It is much simpler. 

If you really do need MySQL (you mentioned "remote users"), you're not giving us nearly enough information to help you. For example, "all it seems to do is generate command syntax errors" is not helpful. What errors?

-tk

VE4PER / Andy

unread,
May 18, 2020, 9:09:11 PM5/18/20
to weewx-user
I use mysql because I am familiar with it.

I managed to get weewx ver 4 communicate with ACUrite display unit ptoper and with no logged errors. I was able to create a database named "weewx" with a new empty table with 114 columns named as posted here in this group post. I created the weewx user with password weewx on that database. I was able to log into the database using that userID and PW to verify the existence of the proper empty table which of course proves weewx ver 4 shud be able to log in and update the database; but it does not do it. Why I do not know. I purged all of weewx and re-installed it fresh to ensure it had not missed an initial connection to the database during the install process. To no avail; I have moved the display unit back onto the machine running linux 18.04lts instead of the currently available 20.04, and it is running weewx older version; BUT IT WORKS properly.

VE4PER / Andy

unread,
May 19, 2020, 8:29:26 AM5/19/20
to weewx-user
On further inspection the table created in the updated machine was a single table with 114 columns; the tables created in the older version sql database  appears to be 114 separate archive tables.

Is Vers 4 supposed to create the needed mysql database tables on install the same as the previous vers of weewx did on install? so before installing weewx  just creatie an empty database weewx with weewx userID and weewx PW?  Clearly a good reason why problems occurring when table structures are incorrect.


On Sunday, May 17, 2020 at 8:07:46 PM UTC-5, VE4PER / Andy wrote:

Tom Keffer

unread,
May 19, 2020, 8:52:16 AM5/19/20
to weewx-user
There is no difference between V3.9 and V4.0 databases. They are identical. The only difference is that V4.0 offers an extended schema, should you want it. If your old database had all the observation types you needed, stick with it. Don't switch.

The database consists of two parts: a large (many) column "archive table", and many, small "daily summaries," one for each type. WeeWX will automatically create the daily summaries on startup. They are there for performance reasons. See the section Database in the docs.

-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/1458064d-3457-4bff-bf00-918f9d84d597%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages