MySql ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

前端 未结 9 2388
借酒劲吻你
借酒劲吻你 2020-12-13 13:19

I\'ve tried multiple solutions from StackOverflow but haven\'t had any success. I\'m on Mac OSX (Sierra 10.12.3) trying to create a new database and user. From terminal I

9条回答
  •  北海茫月
    2020-12-13 13:51

    Comment by @Niagaradad helped me. I was entering the wrong password the whole time.

    Notice the error message

    ERROR 1045 (28000): Access denied for user 'ayaz'@'localhost' (using password: YES)

    It says, Password: Yes. That means I am sending the password to SQL and that is wrong.

    Usually root account doesn't have password if you haven't set one. If you have installed mysql via homebrew then root account won't have a password.

    Here is the comment.

    so, not exactly the same then. NO means you are not sending a password to MySQL. YES means you are sending a password to MySQL but the incorrect one. Did you specifically set a password for the mysql root user when you installed MySQL? By default there is no password so you can use mysql -u root -p and hit enter.

提交回复
热议问题