Trapper Davis
Trapper Davis

Reputation: 75

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. I was immediately shown the error #1045. I did the research, and most solutions I found said to find the Config.inc.php file in my xampp folder. I located it, opened it in my text editor (Brackets 2), and changed the code

$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. Can anybody help?

Upvotes: 0

Views: 1185

Answers (1)

Graeme
Graeme

Reputation: 1698

before you run the editor command put the command 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 :) )

Upvotes: 1

Related Questions