I have upload my laravel project to Ubuntu 14 i have install MySQL to the server put a try to run migrations using php artisan migrate i keep getting this error [PDOException] SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using pas sword: YES i dont understand how to fix this.
Asked
Active
Viewed 1,402 times
2 Answers
0
Hi everyone thanks for the advice and help it was because i did not generate the .en file on the server and my password was wrong to so i am happy now
0
According to your issue you uploaded the entire project including the .env file. In Laravel when uploading your finished work they are several things you don't do:
- never upload the .env file instead regenerate a new one using composer update, as this will contain sensitive information that should not moved in that way.
- use the same application key for both location, this will be regenerated when composer update is run at the new location.
Solution:
- add the .env file to the .gitignore file so it's never seen like other files.
- after uploading your work use the included .env.example file, change it to .env then run composer update. Add your database information from the new location there.
- run
composer updateand the new .env file should be ok.
George Udosen
- 37,534