Fix this error
Fix common errors
Paste the error message you got. Each page explains why it happens and the exact steps to fix it, for Laravel, PHP, MySQL, Composer, npm and more.
3 errors tagged #database · Show all
SQLSTATE[HY000] [2002] Connection refused
SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select * from `users` ...)
PHP reached the database host, but nothing accepted the connection on that port. Usually: MySQL / MariaDB is not running. DB_HOST or DB_PORT in .env is wrong. In Docker, 127.0.0.1...
laravel
mysql
database
SQLSTATE[HY000] [1045] Access denied for user
SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
The database server is running, but it rejected the username or password, or that user is not allowed to connect from this host. DB_USERNAME / DB_PASSWORD in .env are wrong. The pa...
laravel
mysql
database
SQLSTATE[42S22]: Column not found: 1054 Unknown column
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'status' in 'field list'
The query uses a column the table doesn't have. Usually a migration that adds it was not run on this database, the name has a typo, or Eloquent is adding created_at / updated_at to...
laravel
mysql
database