Bottelet / DaybydayCRM

DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
https://daybydaycrm.com
2.24k stars 753 forks source link

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

Open xuelangqingkong opened 1 year ago

xuelangqingkong commented 1 year ago

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 commented 1 year ago

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.