0

I am using below command to create a docker swarm service.

docker service create --name mysql_2 -p target=3306 -e MYSQL_DATABASE=mydb -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:latest

After service creation, when I try to connect mysql database using dbeaver, got below error.

db error 1

I changed allowPublicKeyRetrievel to TRUE but still same issue.

8
  • Have you tried to find solutions on the internet? For example, qiita.com/shaching/items/5fe3d5df691b4ec53084. Or try an earlier version of MySQL. Jan 1, 2021 at 23:18
  • Here in the above link, it is mentioned to change the configuration file in the mysql image.In that case, we need to modify every time and create a new image for every new tag released for official repo. Is there any other option.?
    – uday kiran
    Jan 4, 2021 at 8:24
  • You either have to configure dbeaver to use the new authentication method, or configure the mysql container to use the old authentication method. If neither is possible, you have to use MySQL 5.7 (the most recent version before 8, if I am not wrong), or create your own mysql image. Jan 6, 2021 at 2:37
  • According to hub.docker.com/_/mysql, you can configure the container like this: $ docker run --name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag Jan 6, 2021 at 2:40
  • that is for mapping volumes.But everytime, the config file might change other data also along with this
    – uday kiran
    Jan 6, 2021 at 7:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.