MySQL connects to the database, navicat reports error 2059, docker image

the reason

Error: "Authentication plugin 'caching_sha2_password' cannot be loaded"
The reason why Baidu came, the time is 2019/7/7
mysql version 8.0+ encryption rules become cache_sha2_password, to be honest, this change means that the version of navicat cannot decrypt , Or it's Bate, play the latest, Bette, play the latest, Bette, play the latest

Solution:

method 1

docker run -p 3306: 3306 --name mysql -e MYSQL_ROOT_PASSWORD = 123456 -d mysql
can set configuration parameters when docker starts mysql, as follows:
docker run -d -e mysql_ROOT_PASSWORD = 123456 -p 3307: 3306- name test-mysql --restart always -v / home / ct / mysql / data: / var / lib / mysql
mysql: 8.0.12 --default-authentication-plugin = mysql_native_password
modified to the previous default encryption rule

Method 2

Learn, don't play with the latest, and the next one before 8.0 will be fine.

Published 37 original articles · won praise 6 · views 4667

Guess you like

Origin blog.csdn.net/littlewhitevg/article/details/94988661