Git Product home page Git Product logo

Comments (4)

emergingdzns avatar emergingdzns commented on July 22, 2024

I've also changed the host from 127.0.0.1 to localhost. Neither has made a difference.

from docker-nginx-php-laravel.

dimadeush avatar dimadeush commented on July 22, 2024

We are using host as "mysql" and it is working properly inside CI and on local PC. Maybe you have changed something on your local PC or environment. Also please make sure that all docker containers are running on your local PC.

from docker-nginx-php-laravel.

emergingdzns avatar emergingdzns commented on July 22, 2024

Thanks @dimadeush but I've confirmed it is running. In fact i can connect to it via the port 33061 from my Mac. I kept the ports defined in the yml files provided in the repo as - 33061:3306.

It is part of the laravel network as well.

In fact the initial run even performs the mysql initdb.sql queries I have in there to build the database and basic table schemas.

One thing I noticed that's different is that nginx, laravel, supervisor and my redis configs all say image: ${COMPOSE_PROJECT_NAME}-xxxx:latest (where xxxx is the name of the config). But the mysql entry just says mysql:8.0. I tried adding the ${COMPOSE_PROJECT_NAME}- prefix but it threw an error so undid that.

It's acting like the migration is trying to use a login that isn't correct (like not the root user). But my env shows:

DB_HOST=localhost
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=secret

That's the data I connect to the mysql db with on my mac so I know those credentials work.

I'm stumped.

from docker-nginx-php-laravel.

emergingdzns avatar emergingdzns commented on July 22, 2024

Oh duh. I just realized what you mean. DB_HOST should have been "mysql"... It's working thanks!!

from docker-nginx-php-laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.