Marcus:
I run MariaDB with my WeeWX Setup and yes using a comma is probably giving
you some trouble. WeeWX maybe building a database connection string with
your information and the comma is throwing the connection attempt.
I would recommend changing the password to the user account that is
accessing the weewx account and omit using a comma or a semicolon. There
are enough character/numeral combinations to keep your password strong.
just for reference, here is my MariaDB setup for my station. the password
was obviously changed :)
====== WEEWX.CONF START ======
# This section binds a data store to a database.
[DataBindings]
[[wx_binding]]
# The database must match one of the sections in [Databases].
# This is likely to be the only option you would want to change.
database = archive_mariadb
# The name of the table within the database
table_name = archive
# The manager handles aggregation of data for historical summaries
manager = weewx.manager.DaySummaryManager
# The schema defines the structure of the database.
# It is *only* used when the database is created.
schema = user.weatherlink_live.schema
##############################################################################
# This section defines various databases.
[Databases]
# MySQL
[[archive_mariadb]]
database_name = weewx_davis_vp2
database_type = MariaDB
##############################################################################
# This section defines defaults for the different types of databases.
[DatabaseTypes]
# Defaults for MySQL databases
[[MariaDB]]
driver = weedb.mysql
# The host where the database is located
host = 172.16.1.25
# The user name for logging in to the host
user = weewx
# The password for the user name (quotes guard against parsing
errors)
password = password
====== WEEWX.CONF END =====
Doug
On Tuesday, August 30, 2022 at 8:01:22 AM UTC-4 [email protected] wrote:
> Hello all,
>
> I am stuck with an error that I do not understand with the configuration
> of my remote MariaDB server.
>
> *What I checked:*
> - Remote access on my database server is enabled.
> - Remote login from the weewx host is working as well. (confirmed with
> mariadb -uweewxdb -hdatabase.homenet.local -p; entered the password and
> had access)
>
> *My weewx.conf file: (shortened)*
> [DataBindings]
> [[wx_binding]]
> database = archive_mysql
> table_name = archive
> manager = weewx.manager.DaySummaryManager
> schema = schemas.wview_extended.schema
> [Databases]
> # MySQL
> [[archive_mysql]]
> database_name = weewx
> database_type = MySQL
> [DatabaseTypes]
> # Defaults for MySQL databases
> [[MySQL]]
> driver = weedb.mysql
> host = database.homenet.local
> user = weewxdb
> password = ComplexPrefix,weewxdb # tried also with single and
> double quotes
>
>
> My assumption is, that the comma in my password might cause trouble.
> But I also tried it with 'ComplexPrefix,weewxdb' or
> "ComplexPrefix,weewxdb", and neither helps.
>
>
> *I get an error in my Python:*
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** File "/usr/share/weewx/weedb/mysql.py", line 54, in gua>
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** return fn(*args, **kwargs)
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** File "/usr/share/weewx/weedb/mysql.py", line 136, in __>
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** connection = MySQLdb.connect(host=host, port=int(port>
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** File "/usr/lib/python3/dist-packages/MySQLdb/__init__.p>
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** return Connection(*args, **kwargs)
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** File "/usr/lib/python3/dist-packages/MySQLdb/connection>
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** super(Connection, self).__init__(*args, **kwargs2)
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** *TypeError: connect() argument 3 must be str, not list*
> Aug 30 11:34:46 weewx python3[2909]: weewx[2909] CRITICAL __main__:
> **** Exiting.
>
>
> What is the next thing that I should try?
>
> Thanks and best regards,
> Marcus
>
--
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/6819225b-2611-42e4-8a7a-23f6aaecab23n%40googlegroups.com.