-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin load failed in mysql container #977
Comments
Finally, I find a workaround to bypass the check in option "-initialize-insecure". The way is separating the initialization and real container starting. At first, you should create a MySQL container to initialize the data directory used by real MySQL container. An example is as below.
There are many tips
Then you can start mysql container smoothly without error because the docker-entrypoint.sh will skip the initialization. But I think MySQL container should have a better method to load plugin instead of this weird approach. So I do not close this issue. |
Nice workaround @zyz9740. This helped me get around errors I was struggling with trying to set up a cluster of MySQL containers running MySQL group replication. To be able to do that, I needed to be able to load the I agree that there should be some mechanism built into the MySQL image that allows for the loading of plugins. |
How to reproduce:
docker run -d --name=my-mysql --env="MYSQL_ROOT_PASSWORD=123456" --publish 13306:3306 --volume=./mysql/my.cnf:/etc/my.cnf mysql/mysql-server:8.0.32
my.cnf:
I want to load plugin validate_password.so. But when I run this container, an error is thrown.
I think this error is caused by this line https://github.com/docker-library/mysql/blob/master/8.0/docker-entrypoint.sh#L238C1-L238C1, container use mysql use option "-initialize-insecure" to initialize datadir. Option "-initialize-insecure" will ignore plugin-load, causing the option "validate-password" not recognized.
My question is how to load plugin in mysql container? Is it designed to have no capability to load plugin ?
The text was updated successfully, but these errors were encountered: