Reputation: 1083
I have a Laravel 7 project and pushed it to a live server for production but I can't run migration successfully. I always get an error 'access denied' error.
I can confirm that the command sees the .env file and the connection details are all correct. When I ssh into the server and run mysql
command using same parameters saved in the .env file, connection is successful. Adding the details into workbench and SequelPro also works so I am not sure why php artisan migrate
doesn't work
Upvotes: 1
Views: 117
Reputation: 2536
Run the following command:
php artisan tinker
Tinker is Laravel's own repl.
It will prompt you to enter the commands. Here you can check and print the value of the environment variables by entering string inside env
method.
>>> env('DB_DATABASE')
and so on for the other DB parameters.
Hope this helps.
For more help you can check out the official Github repository of tinker: https://github.com/laravel/tinker
Upvotes: 1