Reset MySQL root password using ALTER USER statement after install on Mac

后端 未结 19 2250
慢半拍i
慢半拍i 2020-11-29 14:21

I\'m new to the whole Mac experience. I recently installed MySQL and it seems I have to reset the password after install. It won\'t let me do anything else.

Now I al

19条回答
  •  日久生厌
    2020-11-29 15:04

    remember versions 5.7.23 and up - the user table doesn't has column password instead authentication string so below works while resetting password for a user.

    update user set authentication_string=password('root') where user='root';
    

提交回复
热议问题