Gitlab CI to automate a wordpress deployment in a docker swarm

Hi guys,
I’m studying gitlab CI and my homework is to deploy a docker stack that will implement a wordpress instance in a swarm.
The stack will be composed of a web service and a database service for wordpress.
The project is this:


The issue is that I just can’t get the sql part right.
In the mysql container i see alot of this when i try to manually start mysqld:
[MY-012574] [InnoDB] Unable to lock ./ibdata1 error: 11

The wordpress service isnt able to connect to mysql.
Checked ports, variables, hostname, networks and volumes.Can’t figure out what i’m missing.Any feedback is most welcomed