Change mysql user password using command line

前端 未结 9 1435
小鲜肉
小鲜肉 2021-01-31 06:49

I\'m trying to update the password for a database user using the command line, and it\'s not working for me. This is the code I\'m using:

mysql> UPDATE user S         


        
9条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 07:19

    This works for me. Got solution from MYSQL webpage

    In MySQL run below queries:

    FLUSH PRIVILEGES;
    ALTER USER 'root'@'localhost' IDENTIFIED BY 'New_Password';
    

提交回复
热议问题