[英]LAMP #1045 - Access denied for user 'root'@'localhost' (using password: NO)
I am somewhat new to xampp, but I was setting up my phpmyadmin MySQL server, and I reset the password for the root user @ localhost. 我对xampp有点陌生,但是我正在设置phpmyadmin MySQL服务器,并且我重置了root用户@ localhost的密码。 I was immediately shown the error #1045. 我立即看到错误#1045。 I did the research, and most solutions I found said to find the Config.inc.php file in my xampp folder. 我进行了研究,发现的大多数解决方案都说可以在xampp文件夹中找到Config.inc.php文件。 I located it, opened it in my text editor (Brackets 2), and changed the code 我找到了它,在我的文本编辑器(Brackets 2)中打开了它,并更改了代码
$cfg['Servers'][$i]['password']=''
to 至
$cfg['Servers'][$i]['password']='NO'.
Once I changed the code, I go to save, but I then receive an error saying I do not have permission to edit the configuration file. 更改代码后,我将进行保存,但是随后收到一条错误消息,提示我无权编辑配置文件。 I am using macOS Sierra version 10.12.4, XAMPP version 5.6.30-1. 我正在使用macOS Sierra版本10.12.4,XAMPP版本5.6.30-1。 Can anybody help? 有人可以帮忙吗?
before you run the editor command put the command sudo
在运行编辑器命令之前,请先放置命令sudo
sudo vi Config.inc.php
This will ask you to enter your password, and then will execute the command as an admin user (assuming you have that right :) ) 这将要求您输入密码,然后以管理员用户身份执行命令(假设您具有该权限:))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.