sql-proxy icon indicating copy to clipboard operation
sql-proxy copied to clipboard

After using pscale connect, cannot connect local mysql container

Open morgs32 opened this issue 2 years ago • 0 comments

Hopefully this can reproduce it:

My docker-compose.yml:

version: "3"

services:

  db:
    user: "1000:50"
    image: mysql:8.0.1
    ports:
      - "3306:3307"
    # command: --init-file /data/application/init.sql
    volumes:
      - ./_data/mysql:/var/lib/mysql
      # - ./init.sql:/data/application/init.sql
    environment:
      MYSQL_USER: user
      MYSQL_PASSWORD: password
      MYSQL_ROOT_PASSWORD: rpassword
      MYSQL_DATABASE: quantamarkets
  • I run docker-compose up db
  • Then mysql -u root -p rpassword -h 127.0.0.1 -P 3306 --protocol=tcp

And get this error:

ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Any clue?

morgs32 avatar Apr 19 '22 20:04 morgs32