第一步,修改权限 mysql> grant all on 数据库名.* to 用户名@'127.0.0.1' identified by '密码'; 第二步,让修改立刻生效 mysql> flush-privileges ;