V
V
Vyacheslav Shevchenko2020-03-01 15:29:50
Docker
Vyacheslav Shevchenko, 2020-03-01 15:29:50

Why does mariadb throw an error: Packets out of order. Expected 0 received 1. Packet size=69?

Hello.
I configure mysql in the docker, based on laradock:

version: '3'

volumes:
  mariadb:
    driver: ${VOLUMES_DRIVER}

networks:
  frontend:
    driver: ${NETWORKS_DRIVER}
  backend:
    driver: ${NETWORKS_DRIVER}

services:
  ### Apache Server ########################################
  php-apache2:
    build:
      context: ./php-apache2
      args:
        - DOCUMENT_ROOT=${APACHE_DOCUMENT_ROOT}
    volumes:
      - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
      - ${APACHE_HOST_LOG_PATH}:/var/log/apache2
      - ${APACHE_SITES_PATH}:/etc/apache2/sites-available
    ports:
      - "${APACHE_HOST_HTTP_PORT}:80"
      - "${APACHE_HOST_HTTPS_PORT}:443"
    networks:
      - backend

### MariaDB ##############################################      
  mariadb:
    build:
      context: ./mariadb
      args:
        - http_proxy
        - https_proxy
        - no_proxy
        - MARIADB_VERSION=${MARIADB_VERSION}
    volumes:
      - ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
      - ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
    ports:
      - "${MARIADB_PORT}:3306"
    environment:
      - TZ=${WORKSPACE_TIMEZONE}
      - MYSQL_DATABASE=${MARIADB_DATABASE}
      - MYSQL_USER=${MARIADB_USER}
      - MYSQL_PASSWORD=${MARIADB_PASSWORD}
      - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
    networks:
      - backend

### phpMyAdmin ###########################################
  phpmyadmin:
    build: ./phpmyadmin
    environment:
      - PMA_ARBITRARY=1
      - MYSQL_USER=${PMA_USER}
      - MYSQL_PASSWORD=${PMA_PASSWORD}
      - MYSQL_ROOT_PASSWORD=${PMA_ROOT_PASSWORD}
    ports:
      - "${PMA_PORT}:80"
    depends_on:
      - "${PMA_DB_ENGINE}"
    networks:
      - frontend
      - backend

I'm running only maridb and phpmyadmin so far. I go to localhost: 8080, enter any user and any password into the mariadb host, I get an error:5e5baaa9239cc030432499.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Shevchenko, 2020-03-01
@WebDev2030

In general, the problem was precisely in the absence of root for any host. I went into the container, then entered mysql: mysql -u root -pEnter the password, if any, and then

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question