diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f9d499b3b115425df62b67a978d9e58caf91899c..ead1dad7ff71438d9481b2a7a7e0e6feb848999f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -19,11 +19,6 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 
-services:
-  - mariadb:10.4
-  - name: mysql:8.0
-    command: ["--default-authentication-plugin=mysql_native_password"]
-
 variables:
   DEPLOY_REF: dev
   CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-mysqlbackend/testenv:latest
@@ -58,19 +53,26 @@ build-testenv:
 
 ######## Test ########
 
-# Run the unit tests with MySQL
-unittests-mysql:
+# Run the unit tests with MariaDB
+unittests-mariadb:
   tags: [ docker ]
   stage: test
+  services:
+    - mariadb:10.4
+
   script:
-    - make pipeline-test SQL_HOST=mysql
+    - make pipeline-test SQL_HOST=mariadb
 
-# Run the unit tests with MariaDB
-unittests-mariadb:
+# Run the unit tests with MySQL
+unittests-mysql:
   tags: [ docker ]
   stage: test
+  services:
+    - name: mysql:8.0
+      command: ["--default-authentication-plugin=mysql_native_password"]
+
   script:
-    - make pipeline-test SQL_HOST=mariadb
+    - make pipeline-test SQL_HOST=mysql
 
 ######## Deploy ########