Docker Mysql ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10

怎么出现的

docker 内部署 Mysql
mysql -h 192.168.10.24
ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10
官方解释

This was because of differences in X Protocol and classic MySQL protocol clients expectations on how connections were initialized. 
Now, in such a situation the generated error message is 
ERROR 2007 (HY000): Protocol mismatch; server version = 11, client version = 10.
If you encounter this error then you are probably trying to use the wrong port for the protocol your client is using. 

错误原因

 mysql-dev:
    image: mysql
    # restart: always
    environment:
      - TZ=Asia/Shanghai
      - MYSQL_ROOT_PASSWORD=123456
    expose:
      - "3306"
    ports:
      - "3306:33060"
    # 版本更新后端口号变了 宿主机:容器端口 改为3306:3306
    volumes:
      - /home/deepin/share/apollo-quick-start/sql:/docker-entrypoint-initdb.d

https://dev.mysql.com/downloads/mysql/

发布了28 篇原创文章 · 获赞 2 · 访问量 7348

猜你喜欢

转载自blog.csdn.net/leyuuu/article/details/103904959