0

I am trying to deploy a Laravel 7.0 application to ubuntu server(Ubuntu 20.04.2 LTS). When I am trying to run migrate it throws the following error. enter image description here

my .env file is:

APP_NAME=Laravel
APP_ENV=producation
APP_KEY=random key
APP_DEBUG=false
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=devport
DB_USERNAME='root'
DB_PASSWORD='password' // please note this password is similar to ubuntu mysql root user password

I also made the following change in config/app.php

 'url' => env('APP_URL', 'http://**.142.**.80'),
 'timezone' => 'Asia/Dhaka',

I tried to solve this problem by several ways like:

  1. reinstalling mysql
  2. clearing config & cache

but nothing works. How to get rid of this issue. please let me know if any further info is needed.note that the app works completely fine in local PC. Thanks in advance.

Osman Rafi
  • 938
  • 1
  • 16
  • 37
  • Have you tried `DB_USERNAME='root' DB_PASSWORD='password'` without the quotes? Not sure why you put them there – brombeer Apr 10 '21 at 16:41
  • Your changes for `'url'` in `config/app.php` will be "overwritten" by your `.env` file. Change `APP_URL` there – brombeer Apr 10 '21 at 16:42
  • i tried without quotes, but not working. Furthermore I replaced the APP_URL in .env file. still it's not working – Osman Rafi Apr 10 '21 at 16:53

0 Answers0