This question has already been answered:
I installed a DB on Debian, I try to connect to it with the command mysql
And to me in response:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
By default, the root should either have a root password, or there should be no password at all. And neither one nor the other does not work.
What to do?