V
V
vladislav9972020-08-11 10:46:55
MySQL
vladislav997, 2020-08-11 10:46:55

Why is there an error in Symfony when connecting to the database (Access denied), although all the data is correct?

Tell me why an error occurs in Symfony 4.4 when connecting to the database (env file):

An exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'

despite the fact that through the terminal and the command mysql -u root -p, entering the same password - can I freely enter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Official account of the Timeweb team, 2020-08-21
@vladislav997

Check the connection to the database in the .env file. Whether precisely to that basis that is registered in a file connection has to be carried out? The error appears to be that the framework is trying to connect to the MYSQL user "root". As a rule, this is a system user, and separate Mysql users are created for sites

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question