1045-Access-denied-for-user-root-localhost-(using-password:YES)的解决方法

首先,登陆MySQL数据库
在这里插入图片描述
然后,修改权限

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

在这里插入图片描述
最后,刷新权限

flush privileges;

在这里插入图片描述
至此搞定,我们查看一下权限
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_41541562/article/details/106577183