Look this link: https://github.com/bitnami/containers/tree/main/bitnami/wordpress Note that: you could the compose file to change the default password.
In some cases, I might need to establish mysql at outside of the wordpress host:
docker run --name mysql \
-e ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_USER=admin \
-e MYSQL_PASSWORD=123456 \
-e MYSQL_DATABASE=wordpress \
-e MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password \
-p 3307:3006 \
bitnami/mysql
I prfer to use mysqldump to save whole db.
## firstly, you might need to install mysql-client before the command below.
mysqldump -h <domain> -P <port> -u root -p <DB name> > ./wholedb.sql
mysql -h 127.0.0.1 -P 3307 -u admin -p wordpress < ./wholedb.sql