How do I change the password of the root user in MySQL?

前端 未结 3 1782
梦毁少年i
梦毁少年i 2020-12-17 05:42

I have long since forgotten the password for the root user on one of my boxes. Is there a way I can change it without having to log in to the instance, or will I have to rei

3条回答
  •  Happy的楠姐
    2020-12-17 06:08

    A quick Google resulted in this answer. In the root shell type:

    mysqladmin -u root password 
    

提交回复
热议问题