grant all privileges on *.* to root@‘localhost‘ identified by ‘密码‘; # 设置权限,输入命令后面必须带分号,否则会自动认为命令未输入完 flush privileges; #用来属性数据库
用来修改此错误
出现 access denied for user 'root'@'localhost'(using password:YES)
原文:https://www.cnblogs.com/lxz123/p/14631687.html