未分類

mysql 修改密碼

sudo mysqladmin password newpass

mysql> set password for ‘root’@’localhost’ = password(‘1234’);mysql> flush privileges;或

mysql> UPDATE mysql.user SET Password = PASSWORD(‘newpwd’) -> WHERE User = ‘root’;mysql> FLUSH PRIVILEGES;