Access denied for user 'homestead@localhost' .. in laravel 5

后端 未结 11 2431
甜味超标
甜味超标 2021-02-10 10:01

I use the command php artisan migrate to migrate my db in laravel 5 .. it gives me an error:

exception \'PDOException\' with message \'SQLSTATE[HY000] [10

11条回答
  •  萌比男神i
    2021-02-10 10:26

    If you have all your configurations ok in the .env file then you should:

    In Terminal run this command that lists processes with php in it:

    ps -ef | grep php
    

    then:

    501 4529 599 0 Sat03PM ttys000 0:00.15 php artisan serve

    501 4533 4529 0 Sat03PM ttys000 0:25.11 /usr/bin/php -S 127.0.0.1:8000 /Applications/XAMPP/xamppfiles/htdocs/ds7/laravel/coffeeshop/server.php

    Use the kill command to terminate the process (Notice: The process id is the second column group of numbers.)

    kill 4529
    kill 4533
    

    Then run php artisan config:clear

    Finally, restart server with:

    php artisan serve
    

提交回复
热议问题