Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

srihs's avatar

php artisan route:list [PDOException] SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES)

Hi Guys,

First of all, I'm new to Laravel :)

Can anyone explain me what is the relationship between php artisan route:list and the database. When I'm trying to run php artisan route:list command it gives me "[PDOException] SQLSTATE[28000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) "

but the route is working fine. Not sure what the logic behind.

Thanks

0 likes
4 replies
bobbybouwmann's avatar

It's not the command that needs the database, but php artisan needs it somehow. You can easily fix this by creating a dummy database or even a sqlite database ;)

srihs's avatar

@bobbybouwmann - Thanks for the reply...

Interesting.. if php artisan is the problem how are the other php artisan commands (like php artisan route:cache or php artisan make:controller) works with out the DB?

bobbybouwmann's avatar

Cool, I was looking for that post as well! Glad you have the answer now ;)

1 like

Please or to participate in this conversation.