A
A
Alexander2020-04-26 22:04:10
MySQL
Alexander, 2020-04-26 22:04:10

Why does laravel throw an error when connecting to mysql?

Updated openserver, now for some reason instead of the standard login and password ("root", ""), you need to enter ("mysql", "mysql"). In this regard, I updated the data in .env to (DB_USERNAME=mysql DB_PASSWORD=mysql), but laravel gives an error when connecting to mysql - SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)

With what it can be connected?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin B., 2020-04-26
@Kostik_1993

php artisan config:clear ?

A
adam_carraway, 2020-04-26
@adam_carraway

The user has no rights. You need to create a new user for the database through the console and give him rights.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question