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/

你可能感兴趣的:(问题集)