[PROMOÇÃO] Assine com + 30% de desconto ANUAL MENSAL (últimas horas)
BRUNO
Criador BRUNO 31/07/2023
[ERROR] [Entrypoint]: MYSQL_USER="root", MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user
 
Remove MYSQL_USER="root" and use one of the following to control the root user password:
- MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD
 
se crio com outro usuario, funciona certinho.
Manager Carlos Ferreira 31/07/2023

Olá, Bruno!
Como vai?

Faltou informar a senha do usuário não root;
https://github.com/especializati/setup-docker-laravel/blob/main/docker-compose.yml#L38

Carlos Ferreira
Criador BRUNO 31/07/2023

mais não informei o usuario nao root e nem a senha, apenas usuario root e senha padrão 

BRUNO
Manager Carlos Ferreira 31/07/2023

Só faltou a variável de ambiente MYSQL_USER:
MYSQL_USER:senha

Carlos Ferreira
Criador BRUNO 31/07/2023

Dessa forma se eu deixar da erro

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=curso_laravel_9
    DB_USERNAME=root
    DB_PASSWORD=root
 
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=curso_laravel_9
DB_USERNAME=bruno
DB_PASSWORD=root
BRUNO
Manager Carlos Ferreira 31/07/2023

A variável DB_USER é no arquivo docker-compose.yml, igual aqui:
https://github.com/especializati/setup-docker-laravel/blob/main/docker-compose.yml#L38

Carlos Ferreira
Criador BRUNO 31/07/2023

https://github.com/BrunoNeves1995/app-laravel.git 

da uma olhada, se uso quaqluer usuario diferente de root da certo

BRUNO
Manager Carlos Ferreira 31/07/2023

O erro acontece quando? Qual vai subir o container do banco de dados?

Carlos Ferreira
Criador BRUNO 31/07/2023

isso mesmo, se deixo usuario = bruno ele sobi normalmente

BRUNO
Manager Carlos Ferreira 31/07/2023

Está certo, porque o usuário root é default, se tentar criar um novo usuário com o nome root vai dar erro mesmo. Se quiser usar o usuário root para se conectar ao banco, não informe a variável MYSQL_USER no docker-compose.yml

Carlos Ferreira
Criador BRUNO 31/07/2023

justamente, para mim ele não criava o usuario automatico, muito obrigado.

BRUNO
Francisco Leal 31/07/2023

Boa noite. Tudo bem?

Segui conforme o github, mas não da certo. O container do mysql reinicia a todo instante. Consegue me ajudar por favor?

db:
        image: mysql:8.0
        platform: linux/x86_64
        restart: unless-stopped
        environment:
            MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-root}
            MYSQL_PASSWORD: ${DB_PASSWORD:-userpass}
            MYSQL_DATABASE: ${DB_DATABASE:-laravel}
        volumes:
            - ./.docker/mysql/dbdata:/var/lib/mysql
        ports:
            - "3388:3306"
        networks:
            - laravel

 

Omiti o MYSQL_USER

Meu .env esta assim:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=francisco
DB_PASSWORD=root

 

E o log assim:

2024-11-22 00:38:03+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.40-1.el9 started.

2024-11-22 00:38:05+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'

2024-11-22 00:38:05+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.40-1.el9 started.

'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'

2024-11-22T00:38:05.991468Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.

2024-11-22T00:38:05.998771Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.40) starting as process 1

2024-11-22T00:38:06.004833Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive

2024-11-22T00:38:06.013894Z 0 [Warning] [MY-000054] [Server] World-writable config file '/var/lib/mysql/auto.cnf' is ignored.

2024-11-22T00:38:06.014944Z 0 [Warning] [MY-010107] [Server] World-writable config file '/var/lib/mysql/auto.cnf' has been removed.

2024-11-22T00:38:06.015488Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 0a09451a-a86a-11ef-8e89-0242ac1b0004.

2024-11-22T00:38:06.027421Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2024-11-22T00:38:07.780829Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

mysqld: Table 'mysql.plugin' doesn't exist

2024-11-22T00:38:08.235587Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.

2024-11-22T00:38:08.235879Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.236100Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.236416Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.236748Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.237016Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.237251Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.237526Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables

2024-11-22T00:38:08.511175Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2024-11-22T00:38:08.725820Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.

2024-11-22T00:38:08.790072Z 0 [Warning] [MY-013595] [Server] Failed to initialize TLS for channel: mysql_main. See below for the description of exact issue.

2024-11-22T00:38:08.790135Z 0 [Warning] [MY-010069] [Server] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key

mysqld: Cannot change permissions of the file 'private_key.pem.temp' (OS errno 1 - Operation not permitted)

2024-11-22T00:38:09.066855Z 0 [ERROR] [MY-010295] [Server] Could not set file permission for private_key.pem

2024-11-22T00:38:09.066897Z 0 [ERROR] [MY-010119] [Server] Aborting

2024-11-22T00:38:10.282118Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.40)  MySQL Community Server - GPL.

 

 

 

Francisco Leal
Manager Carlos Ferreira 31/07/2023

Olá, Francisco! Tudo bem?

Cria uma nova thread (ticket), que te ajudo com o seu problema. Beleza?

Carlos Ferreira
Sabe a Solução? Ajude a resolver!

Precisa estar logado para conseguir responder a este ticket!

Clique Aqui Para Entrar!