T
T
Togzi2022-04-18 06:46:14
MySQL
Togzi, 2022-04-18 06:46:14

How to fix SQLSTATE[HY000] [10 45] Access denied for user ''@'localhost' (using password: NO)?

I'm trying to connect to the database via phinx for migration, I get the error
SQLSTATE[HY000] [10
45] Access denied for user ''@'localhost' (using password: NO)
everything is written in the configs, mysql -u -p works. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TheAndrey7, 2022-04-18
@TheAndrey7

The reason is trite that you did not configure phinx without setting the data for connecting to the database.
https://book.cakephp.org/phinx/0/en/configuration.html

mysql -u -p works
Because there socket authentication is used for root.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question