Using command line options to configure MySQL 8 instead of mounting a config file

parent bf9d55cd
......@@ -4,16 +4,14 @@ set -ex
echo "Starting MySQL 8.0..."
echo -e "[mysqld]\ndefault_authentication_plugin=mysql_native_password" > /tmp/mysql-auth.cnf
sudo docker pull mysql:8.0
sudo docker run \
-d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=doctrine_tests \
-v /tmp/mysql-auth.cnf:/etc/mysql/conf.d/auth.cnf:ro \
-p 33306:3306 \
--name mysql80 \
mysql:8.0
mysql:8.0 \
--default-authentication-plugin=mysql_native_password
sudo docker exec -i mysql80 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment