You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the MYSQL_USER, MYSQL_PASSWORD Environment Variables to cause the docker-entrypoint.sh script to setup an initial database user, you cannot specify which auth_plugin to use and thus the user is setup with the default auth_plugin (caching_sha2_password) which might not be suitable for your use.
As far as I can tell, the mysql-community-server-minimal-8.4 package that we install doesn't include many auth plugins. There are authentication_*.so files, but they seem to be for client, not server.
We don't currently want to add more env vars as the entrypoint script is already very complex. If you need more complex user setup, then a .sql or .sh script in /docker-entrypoint-initdb.d/ is the best answer.
When using the MYSQL_USER, MYSQL_PASSWORD Environment Variables to cause the docker-entrypoint.sh script to setup an initial database user, you cannot specify which auth_plugin to use and thus the user is setup with the default auth_plugin (caching_sha2_password) which might not be suitable for your use.
The user creation command as defined in https://dev.mysql.com/doc/refman/8.0/en/create-user.html
allows you to specify the auth_plugin to use when creating a user.
Thus I suggest that docker_setup_db() of docker-entrypoint.sh script check for an additional Environment Variable like
MYSQL_PASSWORD_PLUGIN
And then
docker_process_sql --database=mysql <<<"CREATE USER '$MYSQL_USER'@'%' IDENTIFIED WITH '$MYSQL_PASSWORD_PLUGIN' BY '$MYSQL_PASSWORD' ;"
Then you could use other plugins like "mysql_native_password" if required
The text was updated successfully, but these errors were encountered: