简体   繁体   中英

MySQL 1044 (42000): Access denied for user ' '@'localhost' to database 'mysql' with Mac

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM