I upgrade laravel to 5.8 from 5.3 using laravelshift one step at a time and tested each upgrade e.g
- Upgrade to 5.4, tested
- Upgrade to 5.5, tested
… - Upgrade to 5.8, tested
but when I deploy it on the server, Linode Server with Cpanel setup, and I select php7.2 in the Mutiphp Manager for this website.
Now this works perfect on local envoirnment in homestead, but on live I get the the db error ‘Access denied for user ‘homestead’@’localhost’ (using password: YES)’.
I also tried to connect to DB using mysql command line tool, and it works using the same password. I also changed the password in cpanel and try with new password. nothing is working.
4
Answers
Changing the password to something simpler e.g only numbers & numeric characters no special characters like
#
or(
etc worked for me.The complex password which include special characters worked for me using the
mysql
tool in command line, but would through error when I runphp artisan install
or run my code in browserhttp://my-project.dev
you may not have homestead named database in your server. Create database first and then try to connect.
I had the same issue when i first used mariadb, maybe, this article keeps the solution for your problem.
Look here: https://superuser.com/questions/603026/mysql-how-to-fix-access-denied-for-user-rootlocalhost
Even though OP has found a solution by using a password without special characters the real reason for this issue is Laravel 5.8 uses the new
phpdotenv
package which treats#
symbol as start of comment.From Laravel 5.8 upgrade guide.