skip to Main Content

How to fix a Laravel Sail "SQLSTATE[HY000] [1130] Host 'XXX.XXX.X.X' is not allowed to connect to this MySQL server" error – Docker

Laravel: 9.2 Mac OS: 12.3.1 Docker Desktop: 4.5.0 I have installed a default Laravel project using sail. My docker-compose.yml file includes the following: mysql: image: 'mysql/mysql-server:8.0' ports: - '${FORWARD_DB_PORT:-3306}:3306' environment: MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' MYSQL_ROOT_HOST: "%" MYSQL_DATABASE: '${DB_DATABASE}' MYSQL_USER: '${DB_USERNAME}' MYSQL_PASSWORD: '${DB_PASSWORD}'…

VIEW QUESTION
Back To Top
Search