如果要修改root的密碼: 1.用root 進(jìn)入mysql后 mysql>set password =password('你的密碼'); mysql>flush privileges; 2.使用GRANT語句 mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密碼'with grant option ; mysql>flush privileges; 3.進(jìn)入mysql庫修改user表 mysql>use mysql; mysql>update user set password=password('你的密碼') where user='root'; mysql>flush privileges; 如果要修改指定用戶的密碼: @>mysql -u root -p
@>密碼 mysql>update mysql.user set password=password('新密碼') where User="phplamp" and Host="localhost"; mysql>flush privileges; |
|