Skip to content

Conversation

@oliver
Copy link

@oliver oliver commented Mar 22, 2025

This PR fixes two problems I encountered when setting up the Docker container for MySQL database:

  • at container startup there was an error message: /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/95_mediathekview_db: Permission denied.
    To fix this, the docker/95_mediathekview_db is now marked as executable in Git.
  • when the mvupdate3 tool was running there was a Python error: TypeError: MySQLCursor.execute() got an unexpected keyword argument 'multi'. It looks like beginning with mysql-connector-python 9.2.0 the cursor.execute() method does not support the multi parameter any more (see docs and changelog).
    I did not quite understand how to migrate to the suggested replacement feature (Executing Multiple Statements) – maybe fetchall() needs to be used now? To fix this for now I have explicitly installed mysql-connector-python version 9.1.0.

Also, I noticed that when running the container with an empty data directory and with RUN_ON_STARTUP=yes, mvupdate3 would be started while MySQL was still starting up; and then mvupdate3 would fail with error message mysql.connector.errors.InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (Errno 111: Connection refused). Restarting the container fixed this (because then the database already existed).

Thank you for providing this plugin!

oliver added 2 commits March 22, 2025 15:08
This fixes the
  /package/admin/s6-overlay-3.2.0.2/etc/s6-rc/scripts/cont-init: line 20: /etc/cont-init.d/95_mediathekview_db: Permission denied
error message when starting the container.
Starting with version 9.2.0 the cursor.execute() method does not support
the "multi" parameter any more, leading to error message
  TypeError: MySQLCursor.execute() got an unexpected keyword argument 'multi'

By pinning the mysql-connector-python version to 9.1.0 the updater works,
for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant