I am trying to add Bagisto to my application stack on the CNAME shop
so I added a new SQL database to host this in Docker-Compose.
When I docker exec -it -u root my_php_container bash
and run php artisan migrate
I get this when it attempts to create a routine.
SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you might want to use the less safe log_bin_trust_functio n_creators variable)
My docker-compose container looks like this:
mysql:
image: 'mysql:latest'
restart: 'unless-stopped'
expose:
- '3306'
environment:
- 'MYSQL_DATABASE=${MYSQL_DATABASE}'
- 'MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}'
- 'MYSQL_USER=${MYSQL_USER}'
- 'MYSQL_PASSWORD=${MYSQL_PASSWORD}'
volumes:
- 'laravel-db:/var/lib/mysql/'
networks:
- 'laravel'
I took a look on SO but cannot find the env for the mysql docker image that regards to this. I tried to add an Entrypoint that just ran an export for log_bin_trust_function_creators=1
but this hasn't worked. Any help appreciated.
I am running Ubuntu 20.04