3
I’m using Docker to generate a LAMP.
Man yml
is like this:
web:
image: tutum/apache-php
ports:
- "80:80"
links:
- db
volumes:
- $PWD:/app
db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD= my-secret-pw
- MYSQL_DATABASE= lamp
- MYSQL_USER= lamp_user
- MYSQL_PASSWORD= lamp_pass
ports:
- "3306:3306"
When trying to access mysql through another machine, is giving the following error in Workbench:
Authentication plugin 'caching_sha2_password' cannot be loaded
I saw a crowd saying I have to edit the my.ini
and edit the following line with this value :
[mysqld]
default_authentication_plugin=mysql_native_password
But I’m not sure how to edit the my.ini
.
Am I following the right solution? If yes, how do I edit the file in question?
You can pass as volume (
-v
) the conf file with what you need– Tuxpilgrim
@Tuxpilgrim Then I pass all the conf, even needing to change only one line ?
– Pedro Augusto
The right thing would be for you to create your own
.ini
and spend it on youryml
. Saw if this problem happens I all versions of the image ofmysql
? Maybe it’s just the last one, which is the one you’re wearing.– Tuxpilgrim
@Tuxpilgrim on the fly. I set the version to 5.6 and it worked perfect. I will post an answer with the
yml
will help someone one day. THANK YOU VERY MUCH– Pedro Augusto
Good, sometimes raise an image
latest
for production can give problem even ;)– Tuxpilgrim