Looking a little bit closer at the command you used, the syntax is not
quite right. Instead of


*sudo wee_database --transfer --dest-binding = dest_binding --dry-run*

your want


*sudo wee_database --transfer --dest-binding=dest_binding --dry-run*

-tk

On Tue, Mar 3, 2020 at 10:07 AM Eric Gammeter <[email protected]> wrote:

> Yes: here it is from weewx.conf file:
>
>
>    [[dest_binding]]
>         database = archive_mysql
>         table_name = archive
>         manager = weewx.wxmanager.WXDaySummaryManager
>         schema = schemas.wview.schema
>
>
>
> On Tuesday, February 25, 2020 at 9:11:40 AM UTC-5, Eric Gammeter wrote:
>>
>>
>> Goal:
>> Wanting to switch from sqlite to MySql database.
>>
>> I am consulting the github /weewx/wiki "Usingwee_database".
>>
>> The --dry-run doesn't show any error.
>>
>>
>> pi@raspberrypi:~ $ wee_database --transfer --dest-binding=dest_binding
>> --dry-run
>> Using configuration file /etc/weewx/weewx.conf
>> Using database binding 'wx_binding', which is bound to database
>> 'archive_sqlite'
>> Transfer 9177 records from source database 'weewx.sdb' to destination
>> database 'weewx'.
>> Dry run, nothing done.
>> pi@raspberrypi:~ $ wee_database --transfer --dest-binding=dest_binding
>> Using configuration file /etc/weewx/weewx.conf
>> Using database binding 'wx_binding', which is bound to database
>> 'archive_sqlite'
>> Transfer 9177 records from source database 'weewx.sdb' to destination
>> database 'weewx' (y/n)? y
>> Error accessing destination database 'weewx'.
>> Nothing done. Aborting.
>> Traceback (most recent call last):
>>   File "/usr/bin/wee_database", line 794, in <module>
>>     main()
>>   File "/usr/bin/wee_database", line 159, in main
>>     transferDatabase(config_dict, db_binding, options)
>>   File "/usr/bin/wee_database", line 410, in transferDatabase
>>     schema=dest_manager_dict['schema']) as dest_manager:
>>   File "/usr/share/weewx/weewx/manager.py", line 128, in open_with_create
>>     connection = weedb.connect(database_dict)
>>   File "/usr/share/weewx/weedb/__init__.py", line 86, in connect
>>     __import__(db_dict['driver'])
>>   File "/usr/share/weewx/weedb/mysql.py", line 10, in <module>
>>     import MySQLdb
>> ImportError: No module named MySQLdb
>>
>> --
> 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/f990a6c7-8b77-446c-9f42-c57a49fd16ac%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/f990a6c7-8b77-446c-9f42-c57a49fd16ac%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAPq0zEBUXeygC8J7vwEhQu4J2ejuMBm0BW9iffk3WYUWp6NcRQ%40mail.gmail.com.

Reply via email to