如何解决#1045 - Access denied for user 'root'@'localhost' (using password: NO)问题

时间:2023-03-10 02:32:43
如何解决#1045 - Access denied for user 'root'@'localhost' (using password: NO)问题

1、 #1045 - Access denied for user 'root'@'localhost'  (using password: NO) 解决方案

在phpMyAdmin中libraries目录下找到config.default.php文件  165行

下面默认为空

$cfg['Servers'][$i]['password'] = '';

如果你的mysql数据库设置了登陆密码,则在此处添加你的登陆密码,如我的mysql密码为root则改成 $cfg['Servers'][$i]['password'] = 'root';