DEV Community

Discussion on: php artisan migrate

Collapse
 
herivgs profile image
herivgs • Edited

I'm assuming that you are running MYSQL Version 8... So, you are having issues with passsword encrypting "caching_sha2_password" that is configured by default in Mysql8 and Laravel does not support it well.

There's two way that you can fix that:

  1. The easy way is to downgrade to 5.x version
  2. Modify the encryptation of the user's password with: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password'
Collapse
 
highcenburg profile image
Vicente G. Reyes

On my MAMP's preferences, MySQL is using 5.7.25.

Collapse
 
herivgs profile image
herivgs

did you tried the second one?

Modify the encryptation of the user's password with:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password'

Thread Thread
 
highcenburg profile image
Vicente G. Reyes

Yup.

zsh: command not found: ALTER
Collapse
 
mhrabiee profile image
Mohammad Hossein Rabiee

Great workaround dude!