docker 部署指定 mysql:8 下载的最新8.4版本的mysql 启动时出现该错误

解决办法
由于mysql8.4废弃该参数default-authentication-plugin=mysql_native_password,改为使用这个参数

--mysql-native-password=ON
services:
  mysql:
    image: mysql:8
    command:  --mysql-native-password=ON --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    restart: always

参考
官方文档说明
https://dev.mysql.com/doc/refman/8.4/en/native-pluggable-authentication.html#native-pluggable-authentication-installation

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐