Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: docker compose exec php php artisan migrate --seed #320

Open
xuelangqingkong opened this issue Nov 30, 2022 · 1 comment
Open

ERROR: docker compose exec php php artisan migrate --seed #320

xuelangqingkong opened this issue Nov 30, 2022 · 1 comment

Comments

@xuelangqingkong
Copy link

Dear Casper

Firstly, thank you very much for your generous work here.
I tried to install the software on my Centos 7 but got the error when try to run
"docker compose exec php php artisan migrate --seed "
The error is like this:

Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = daybyday and table_name = migrations and table_type = 'BASE TABLE')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {

671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|

  +36 vendor frames

37 artisan:30
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Do you know what is wrong here ?
Thank you very much.

@lucasao98
Copy link

Hi, how are you? Fine I hope. I was installing the application and had same problem. So I open the terminal to read the messages, and I receive the same message that you received. Then, I open the file, docker-compose.ev and insteady of root in DB_USERNAME, I changed to MYSQL_ROOT_PASSWORD. Later, I open file docker-compos.yml and change in line 61 MYSQL_USER, eraser root and put MYSQL_ROOT_PASSWORD. Then already all was good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants