diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de2a69af..d9bb19b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -114,7 +114,7 @@ jobs: fi if [ "${{ matrix.db }}" == "mysql" ]; then echo "MYSQL_HOST=127.0.0.1" >> $GITHUB_ENV - echo "JUPYTERHUB_TEST_DB_URL=mysql+mysqlclient://root@127.0.0.1:3306/jupyterhub" >> $GITHUB_ENV + echo "JUPYTERHUB_TEST_DB_URL=mysql+mysqldb://root@127.0.0.1:3306/jupyterhub" >> $GITHUB_ENV fi if [ "${{ matrix.ssl }}" == "ssl" ]; then echo "SSL_ENABLED=1" >> $GITHUB_ENV diff --git a/docs/source/explanation/database.md b/docs/source/explanation/database.md index 8e4ea59c..f0ab5dfb 100644 --- a/docs/source/explanation/database.md +++ b/docs/source/explanation/database.md @@ -179,5 +179,5 @@ For example, to connect to a mysql database with mysqlclient: 2. configure [](JupyterHub.db_url): ```python - c.JupyterHub.db_url = "mysql+mysqlclient://myuser:mypassword@my-sql-server:3306/my-db-name" + c.JupyterHub.db_url = "mysql+mysqldb://myuser:mypassword@my-sql-server:3306/my-db-name" ``` diff --git a/jupyterhub/tests/test_db.py b/jupyterhub/tests/test_db.py index ee9d0bbd..f8c379bc 100644 --- a/jupyterhub/tests/test_db.py +++ b/jupyterhub/tests/test_db.py @@ -35,7 +35,7 @@ def generate_old_db(env_dir, hub_version, db_url): pkgs.append('sqlalchemy<2') if 'mysql' in db_url: - pkgs.append('mysql-connector-python') + pkgs.append('mysqlclient') elif 'postgres' in db_url: pkgs.append('psycopg2-binary') check_call([env_pip, 'install'] + pkgs)