项目中登录mysql查询数据,突然报错 Access denied for user 'root'@'localhost' (using password: YES)。以前都是好的,怎么突然报这个错。后面,虽然重新设置了密码解决了问题(密码没变,只是重新设置了下),但是还是不知道这个是什么原因引起的。求大神解答,多谢多谢!
本来准备配置数据库远程连接,设置后,就报错如下了:CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES),求教各位大神,是什么原因,怎么解决啊,谢谢
重装了mysql,修改了密码,却发现无法连接,报错:Access denied for user 'root'@'localhost' (using password:YES)
查找资料后,大概是说没有给root设置权限,修复方法如下:
1、停止mysql服务,最简单办法:打开任务管理器--服务,关闭MySql。
2、建立一个txt文件mysql-init.t...