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

后端 未结 19 2222
慢半拍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:24

    in 5.7 version. 'password' field has been deleted. 'authentication_string' replace it

    use mysql;
    update user set authentication_string=password('123456') where user='root';
    flush privileges;
    

提交回复
热议问题