原因没有打开root的权限 在窗口运行下面指令 grant all privileges on *.* to 'root'@'%'identified by '密码'; flush privileges; //刷新