首页 > 代码库 > Access denied for user 'root'@'localhost' (using password:YES) 问题

Access denied for user 'root'@'localhost' (using password:YES) 问题

该问题为mysql密码未设置的问题

window环境

cmd命令窗口

mysql -u root mysql 进入mysql

update user set password=password(‘123‘) where user=‘root‘---->修改root的密码

flush priviledge;  刷新权限

\q  退出

mysql -u root -p 重新进入

 

Access denied for user 'root'@'localhost' (using password:YES) 问题