Reputation: 1330
I ran MySQL with the Terminal with the following command.
mysql -u root
Then I tried to execute use mysql;
, but it did not go properly but showed an unexpected message as follows.
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'
Why do you think it's happening? Someone please help me..
Upvotes: 0
Views: 506
Reputation: 342
Your login credentials are wrong. Did you create a password while installing MySQL?
try mysql -u root -p
and enter the password in the prompt to log in.
If you've lost your password, try resetting it. View this answer to reset password.
Upvotes: 1