Comments (6)
It sometimes need some time for mysql to start. It might because of .env file.
Please make .env file and make sure the values are okey.
Follow this instruction:
docker-compose down
# make/debug your .env file
rm -rf ./docker/mysql
docker-compose up -d
# wait for a minute
docker-compose exec php php artisan migrate
from laravel-docker-compose.
It sometimes need some time for mysql to start. It might because of .env file. Please make .env file and make sure the values are okey. Follow this instruction:
docker-compose down # make/debug your .env file rm -rf ./docker/mysql docker-compose up -d # wait for a minute docker-compose exec php php artisan migrate
this is my .env file
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=vahi4368
I implemented your suggestion but it is still the same. I entered the database and saw that the laravel database is available, but apparently it cannot be connected due to the ports.
I am running this test on an ubuntu 20 cloud server with root access
from laravel-docker-compose.
i solved it , want to send new pull request to you accept it ?
from laravel-docker-compose.
Sure, if it helps i'll merge it.
from laravel-docker-compose.
I will follow up other cases in other issues and when all cases are resolved in the conditions I am running, I will send a pull request.
Thankful
from laravel-docker-compose.
#run below to get internal sample_mysql IP
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
#open .env and chanege DB_HOST=YOUR-IP-IN-DOCKER
docker-compose exec php php artisan migrate
docker-compose ps
work fine migrate
but after each reset server sample_mysql IP will change
from laravel-docker-compose.
Related Issues (5)
- Do work fine with octane ? HOT 2
- have error in debian 11 HOT 2
- ip 0.0.0.0 or 127.0.0.1 in web sever not work HOT 9
- یک سوال HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-docker-compose.