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

Cant set up php enviroment in Docker

When I run docker run --rm -v $(pwd):/opt -w /opt laravelsail/php81-composer:latest composer install to install all the composer dependencies, these popped up ~/Crowdstage$ docker run --rm -v $(pwd):/opt -w /opt laravelsail/php81-composer:latest composer install Installing dependencies from lock file (including require-dev)…

VIEW QUESTION

Return json response in ajax request laravel – Jquery ajax

I have the following ajax code in my frontend. var formData = $('#application-information-step-one').serialize(); var actionUrl = $('#application-information-step-one').attr('action'); $.ajax({ url: actionUrl, type: 'POST', data: formData, success: function(data) { var resp = JSON.stringify(data); console.log(resp); }, error: function(data) { } And following code…

VIEW QUESTION
Back To Top
Search