Similar to Change MySQL/MariaDB Root Password, but with an explicit use case and warning.
Your Setup:
- Docker environment on VMware ESXi VM (tried and tested)
- SeaTable Edition: Enterprise
- SeaTable Version: 5.0.8 (“new” docker compose structure)
Describe the Problem/Error/Question:
Using special characters (namely the Ampersand &, maybe others) breaks the python scheduler container, and maybe other things. To reproduce
- Set up a new seatable instance, including python-pipeline.yml
- Set SEATABLE_MYSQL_ROOT_PASSWORD to a string ending with ‘&’
- Seatable initializes as usual
- The Python Scheduler container gives an Error 500 when a python script is run.
- Same installation with an all-ASCII root password works fine
Error Messages:
The python scheduler container logs the following:
mysql server ready
Initalization of database successful
ERROR 1045 (28000): Access denied for user 'root'@'172.19.0.5' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'172.19.0.5' (using password: YES)
Check for updates of Python Scheduler ...
(pymysql.err.OperationalError) (1049, "Unknown database 'scheduler'")
Possible reason
It seems as if the Python Scheduler container accesses the database in two different ways, and possibly at least on one occasion through an URL. The password does not seem to be properly URLencoded (&), leading to the described behaviour.
I tried to manually URLencode the password in python-pipeline.yml
. That way, the database did not even initialize, leading me to the conclusion that the python scheduler uses two different ways to access the database, one of which needs the URLencoded password (or just generally stumbles over special characters).
Workaround
Don’t use passwords with special characters. Just make them long.
If, like me, you need to upgrade from an existing Seatable 4.4.9 database with a special character root password, and want to add the python runner to your installation, you probably need to change the root password manually via the mysql client first. Doh!