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.
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:
- reinstalling mysql
- 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.