Closed nurikabe closed 6 years ago
I'm curious if there may be a race condition on the availability of the mysql service. Assuming you're using the database example for mysql docker-compose.yml
, the mysql container will create a new octobercms
database each time it starts up.
You must wait for that process to complete before running docker-compose exec web php artisan october:up
Watch the output of the mysql container logs docker-compose logs -f
. Once you see 'ready for connections' in the logs, try the october:up
cmd.
Also, if you'd like the database to persist, you can add a bind mount volume for /var/lib/mysql
to the mysql service in your docker-compose.yml
volumes:
- ./db:/var/lib/mysql
Ah, it looks like the server is asking the client to use some kind of newer caching_sha2_password
auth protocol. PHP mysqli doesn't seem to support this yet. (And neither do DbVis nor HeidiSQL as far as I can tell.)
Some details: https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded
Going back to image: mysql:5.7
seems to work.
Thanks for the heads up.
docker-compose exec web php artisan october:up
Am I doing something wrong?