如何修改数据库密码

use mysql;

SET PASSWORD FOR ‘root’@‘%’ = ‘xxxx’;

update user set authentication_string="xxx"password where user=“root”;(设置root密码2选一命令)