IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Docker Discussion :

[Docker]table système mysql manquante


Sujet :

Docker

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau candidat au Club Avatar de plieuseParis
    Femme Profil pro
    Testeur logiciel
    Inscrit en
    Octobre 2019
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Testeur logiciel

    Informations forums :
    Inscription : Octobre 2019
    Messages : 6
    Par défaut [Docker]table système mysql manquante
    Bonjour,

    J'essaie de faire le MOOC "Automatisez des tests fonctionnels pour le web avec Cypress" sur OpenClassrooms (https://openclassrooms.com/fr/course...b-avec-cypress).
    Il y a plusieurs étapes de préparation (installation de Docker, vérification de la possibilité de virtualiser sur le PC...) et j'en suis à démarrer le conteneur pour simuler un site web de vente en ligne de matériel informatique.
    Le conteneur est fourni par OpenClassrooms : https://github.com/OpenClassrooms-St...96-Tech-Buy-FR
    Il y a trois éléments dans le conteneur : Angular, Symfony et MySQL. C'est ce dernier qui ne démarre pas correctement (ni depuis Docker Desktop, ni depuis l'invite de commandes avec "docker-compose up").

    2025-07-30 08:59:31.363 | 2025-07-30T06:59:31.363065Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 9.4.0) MySQL Community Server - GPL.
    2025-07-30 08:59:31.363 | 2025-07-30T06:59:31.363114Z 0 [System] [MY-015016] [Server] MySQL Server - end.
    2025-07-30 08:59:32.116 | 2025-07-30 06:59:32+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started.
    2025-07-30 08:59:40.055 | 2025-07-30 06:59:40+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
    2025-07-30 08:59:40.065 | 2025-07-30 06:59:40+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.4.0-1.el9 started.
    2025-07-30 08:59:40.589 | '/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
    2025-07-30 08:59:41.104 | 2025-07-30T06:59:40.634993Z 0 [System] [MY-015015] [Server] MySQL Server - start.
    2025-07-30 08:59:41.104 | 2025-07-30T06:59:41.084837Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.4.0) starting as process 1
    2025-07-30 08:59:41.104 | 2025-07-30T06:59:41.084899Z 0 [System] [MY-015590] [Server] MySQL Server has access to 8 logical CPUs.
    2025-07-30 08:59:41.104 | 2025-07-30T06:59:41.084933Z 0 [System] [MY-015590] [Server] MySQL Server has access to 4020469760 bytes of physical memory.
    2025-07-30 08:59:41.104 | 2025-07-30T06:59:41.102536Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
    2025-07-30 08:59:41.211 | 2025-07-30T06:59:41.210893Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
    2025-07-30 08:59:57.829 | 2025-07-30T06:59:57.829572Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
    2025-07-30 08:59:58.838 | mysqld: Table 'mysql.plugin' doesn't exist
    2025-07-30 08:59:58.838 | 2025-07-30T06:59:58.838100Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
    2025-07-30 08:59:58.838 | 2025-07-30T06:59:58.838712Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.839 | 2025-07-30T06:59:58.839097Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.839 | 2025-07-30T06:59:58.839480Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.840 | 2025-07-30T06:59:58.840228Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.841 | 2025-07-30T06:59:58.840825Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.841 | 2025-07-30T06:59:58.841228Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:58.841 | 2025-07-30T06:59:58.841609Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:59.149 | 2025-07-30T06:59:59.149380Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
    2025-07-30 08:59:59.350 | 2025-07-30T06:59:59.349761Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
    2025-07-30 08:59:59.389 | 2025-07-30T06:59:59.389539Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
    2025-07-30 08:59:59.390 | 2025-07-30T06:59:59.390627Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
    2025-07-30 08:59:59.414 | 2025-07-30T06:59:59.414395Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
    2025-07-30 08:59:59.457 | 2025-07-30T06:59:59.456757Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
    2025-07-30 08:59:59.457 | 2025-07-30T06:59:59.457279Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
    2025-07-30 08:59:59.457 | 2025-07-30T06:59:59.457345Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
    2025-07-30 08:59:59.457 | 2025-07-30T06:59:59.457561Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'.
    2025-07-30 08:59:59.459 | 2025-07-30T06:59:59.458730Z 0 [ERROR] [MY-010119] [Server] Aborting
    2025-07-30 09:00:01.745 | 2025-07-30T07:00:01.745037Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 9.4.0) MySQL Community Server - GPL.
    2025-07-30 09:00:01.745 | 2025-07-30T07:00:01.745143Z 0 [System] [MY-015016] [Server] MySQL Server - end.
    Quand on essaie de démarrer mysql, il y a plusieurs traces de niveau Note ou System, un Warning et surtout une trace de niveau Error :
    2025-07-30 08:59:58.838 | mysqld: Table 'mysql.plugin' doesn't exist
    2025-07-30 08:59:58.838 | 2025-07-30T06:59:58.838100Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.

    Le fichier docker-compose.yml spécifie la version "latest" de MySQL :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    version: "3.9"
    
    services:
      angular:
        build: ./frontend
        ports:
          - 8080:8080
        volumes:
          - ./frontend:/app
        depends_on:
          - symfony
    
      symfony:
        build: ./backend
        ports:
          - 8081:8081
        volumes:
          - ./backend:/backend
        environment:
          - DATABASE_URL=mysql://root:techbuy@mysql:3306/techbuy?serverVersion=8&charset=utf8mb4
        depends_on:
          - mysql
        networks:
          - symfony
    
      mysql:
        image: mysql:latest
        restart: always
        command: --default-authentication-plugin=mysql_native_password
        environment:
          - MYSQL_DATABASE=techbuy
          - MYSQL_ROOT_PASSWORD=techbuy
          - MYSQL_USER=techbuy
          - MYSQL_PASSWORD=techbuy
    
        volumes:
          - ./data:/docker-entrypoint-initdb.d
          - ./mysql:/var/lib/mysql
        networks:
          - symfony
        ports:
          - 3308:3306
    
          
    networks:
      symfony:
      
    volumes:
      data:
    C'est un cours qui existe depuis environ deux ans.
    Je ne sais pas quoi faire. Est-ce que quelqu'un peut m'aider ? Merci d'avance.

  2. #2
    Responsable Systèmes


    Homme Profil pro
    Gestion de parcs informatique
    Inscrit en
    Août 2011
    Messages
    18 258
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Gestion de parcs informatique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Août 2011
    Messages : 18 258
    Par défaut
    Comme l'indique les logs, il faut faire un upgrade des tables système. A faire depuis une console dans le conteneur. Le prob étant que du coup il faut recréer une image depuis le conteneur upgradé.

    Essayes sans utiliser :
    command: --default-authentication-plugin=mysql_native_password
    Ma page sur developpez.com : http://chrtophe.developpez.com/ (avec mes articles)
    Mon article sur le P2V, mon article sur le cloud
    Consultez nos FAQ : Windows, Linux, Virtualisation

  3. #3
    Nouveau candidat au Club Avatar de plieuseParis
    Femme Profil pro
    Testeur logiciel
    Inscrit en
    Octobre 2019
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Testeur logiciel

    Informations forums :
    Inscription : Octobre 2019
    Messages : 6
    Par défaut (Suite et fin)
    Bonjour ! merci pour ta réponse. Ce n'était pas ça, mais j'ai fini par débloquer la situation. C'est une solution en deux étapes :
    1. constater qu'il y a une v2 disponible au téléchargement sur GitHub : https://github.com/OpenClassrooms-St...er/Tech-Buy-V2
    2. récupérer le docker-compose.yml et le data/techbuy.sql de ce deuxième dossier, et les coller dans le premier conteneur

    Après pas mal de recherches, ça marche. Bon courage et j'espère que ça aidera les suivants !
    Marie

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [2003][MySQL] Exporter les tables vers MySQL
    Par DavidDeTroyes dans le forum Access
    Réponses: 3
    Dernier message: 08/03/2006, 17h47
  2. trigger createur de table sous mysql
    Par lours85 dans le forum SQL Procédural
    Réponses: 1
    Dernier message: 20/02/2006, 11h53
  3. Creer table avec mysql
    Par gotenks dans le forum Requêtes
    Réponses: 8
    Dernier message: 05/01/2006, 12h01
  4. Où sont fichiers (tables) de Mysql ?
    Par __fabrice dans le forum Administration
    Réponses: 5
    Dernier message: 17/02/2005, 11h18
  5. Problème de création de table sous MySql
    Par ducamba dans le forum Requêtes
    Réponses: 2
    Dernier message: 21/06/2003, 09h59

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo