Answer the question
In order to leave comments, you need to log in
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
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 worksBecause there socket authentication is used for root.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question