Is this an issue with missing python packages/drivers or something else? I must admit I took the following to indicate more of database not found/credential issue rather than a missing package/driver issue.
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 9187 records from source database 'weewx.sdb' to destination database 'weewx' (y/n)? y Error accessing destination database 'weewx'. Maybe it does not exist (MySQL) or is incorrectly defined in weewx.conf? Nothing done. Aborting I have been using MariaDB for a while now and have not needed to install anything other than the pre-reqs listed in the docs. MariaDB seems to default now to using some means of authentication other than user/password (I've seen reference to authentication using the unix_socket plugin ?). One thing I have done, and perhaps it is just a personal preference, is to change this back to user/password authentication on my installs. I guess I would be asking the user can he access MariaDB from the command line with the credentials in weewx.conf. Gary On Wednesday, 26 February 2020 09:50:06 UTC+10, Thomas Keffer wrote: > > You did both commands and the MySQL driver is still not available? > > What happens if you do > > *python -c "import MySQLdb"* > *python -c "import weedb.mysql"* > > If either of these fail, then the MySQL drivers were not installed. > > NB: there may now be separate drivers for the MariaDB database, but we > don't support them. The assumption is that the MySQL drivers will still > work. If that's not true, then we have a problem! > > -tk > > > On Tue, Feb 25, 2020 at 12:14 PM Eric Gammeter <[email protected] > <javascript:>> wrote: > >> Yes. Both commands were issued. >> >> >> >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/weewx-user/e02915bd-b730-4478-a7b8-02a3e18bf0fd%40googlegroups.com >> >> <https://groups.google.com/d/msgid/weewx-user/e02915bd-b730-4478-a7b8-02a3e18bf0fd%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/d0cdd295-ead2-451b-b4b7-8cacdaef678f%40googlegroups.com.
