Das Problem bezog sich nicht auf Superset oder Netzwerk. Sie haben das richtige Netzwerk konfiguriert, aber default-authentication-plugin nicht aktiviert auf MySQL-Docker-Images. Aufgrund dieses Fehlers wurde auf der Konsole was
angezeigt Plugin caching_sha2_password could not be loaded:
Um zu reproduzieren:
Fehlerprotokolle:
sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1045, 'Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory')
(Background on this error at: http://sqlalche.me/e/13/e3q8)
So beheben Sie das Problem:
MySQL-Image mit default-authentication-plugin erstellen
docker run --detach --network="incubator-superset_default" --name=mysql --env="MYSQL_ROOT_PASSWORD=sample" --publish 3306:3306 mysql --default-authentication-plugin=mysql_native_password
Superset verfügt bereits über ein benutzerdefiniertes Bridge-Netzwerk, sodass Sie beide Formate verwenden können
mysql://root:[email protected]/mysql
mysql://root:[email protected]/mysql