0

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..

MarshallLee
  • 1,290
  • 4
  • 23
  • 42

1 Answers1

1

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.

Community
  • 1
  • 1
Srinivas
  • 332
  • 4
  • 18