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/

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章