MySQL修改密码的三种方法
1.方法1:
UPDATE mysql.user SET Password=PASSWORD('新密码') WHERE user='root';
FLUSH PRIVILEGES;
2.方法2:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('新密码');
FLUSH PRIVILEGES;
3.方法3:
mysqladmin -uroot -p旧密码 password "新密码"
MySQL修改密码的三种方法
1.方法1:
UPDATE mysql.user SET Password=PASSWORD('新密码') WHERE user='root';
FLUSH PRIVILEGES;
2.方法2:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('新密码');
FLUSH PRIVILEGES;
3.方法3:
mysqladmin -uroot -p旧密码 password "新密码"