Joomla problem mysqli connection

I am new to docker and run into some problems. I made a database with MySQL and linked it with a Joomla image and created a container out of it. It automatically stops after 30 seconds and in the logs I see the following:

Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in /makedb.php on line 20

Warning: mysqli::__construct(): (HY000/2054): The server requested authentication method unknown to the client in /makedb.php on line 20

I used the following commands but it does not seem to work:
sudo docker run --name joomla_db -d -e MYSQL_ROOT_PASSWORD=Welkom123 -p 3306:3306 mysql

sudo docker run --name joomla80 -e JOOMLA_DB_HOST=joomla_db:3306 -e JOOMLA_DB_USER=root -e JOOMLA_DB_PASSWORD=Welkom123 -e JOOMLA_DB_NAME=joomla -d --link joomla_db:mysql joomla

sudo docker run --name joomla80 -d -e JOOMLA_DB_PASSWORD=Welkom123 --link joomla_db:mysql joomla

sudo docker run --name joomla8080 -d -e JOOMLA_DB_PASSWORD=Welkom123 -e JOOMLA_DB_NAME=joomla8080 -p 8080:80–link joomla_db:mysql joomla

1 Like