Laravel from Scratch - Traversy YouTube - SQLSTATE[HY000] [1045] error when run PHP artisan migrate
0
votes
1
answer
816
views
I'm running PHP 7.4.9, Laravel 8 and MAMP 6.0.1 and am learning Laravel.
Those of you running **MAMP** and following this excellent tutorial will find in Video 5 that you will get this error when attempt to run the PHP artisan migrate command in video #5:
SQLSTATE[HY000] Access denied for user 'root'@'localhost' (using password: NO) (SQL: select * from information_schema.tables where table_schema = lsapp and table_name = migrations and table_type = 'BASE TABLE')
It looks like a basic mySQL issue but it's not, it's due to some missing configuration in the defaul Laravel configuration for MAMP users. I spent ages attempting to resolve and found bits of helpful and conflicting info across different threads so thought it would be useful to combine the solution in one place...
Asked by NickC
(56 rep)
Jan 16, 2021, 04:30 PM
Last activity: Oct 9, 2022, 04:04 AM
Last activity: Oct 9, 2022, 04:04 AM