K
K
Kazah902018-07-05 19:53:24
PHP
Kazah90, 2018-07-05 19:53:24

Why is there no database connection?

Good afternoon, I tried to work with models and came across such an error

SQLSTATE[HY000] [1045] Access denied for user 'мой логин'@'мой айпи' (using password: YES)
, where it tells me that it cannot connect to the database, but the bottom line is that before that I had a successful migration, the tables were added to the database, which means that there is a connection.
Clearing the cache, and other tips from Google do not help. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Max, 2018-07-06
@MaxDukov

most likely the user has rights to connect only locally
do

select host, user  from mysql.user  where user='мой логин';

if in all rows host: localhost, then it is

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question