title: phpmyadmin - unable to edit config.inc.php
body: <p>While creating a database, I added a root access password, which initially wasn't set.
  And now i cant access localhost/phpmyadmin anymore</p>
  
  <blockquote>
    <p>mysqli_real_connect(): (HY000/1045): Access denied for user
    'root'@'localhost' (using password: NO)</p>
  </blockquote>
  
  <p>I know I have to edit this line in the config.inc.php file</p>
  
  <pre><code>$cfg['Servers'][$i]['password'] = '';
  </code></pre>
  
  <p>but I cant save the file after making the edit.
  If i do it via opening the file normally, I get this:</p>
  
  <blockquote>
    <p>Failed to save 'config.inc.php': Insufficient permissions. Select
    'Retry as Admin' to retry as administrator.</p>
  </blockquote>
  
  <p>Even after clicking Retry as admin and entering the sudo password, it gives the same error.</p>
  
  <p>If i try via terminal with sudo access and vim edit, I still get unable to open file for writing error.</p>
  
  <p>I am on a mac. I have tried doing this via sudo from terminal, I have tried changing chmod permissions. I have browsed through almost all of the similar questions here, but none of the solution is working.
  Nothing seems to work apparently.</p>
  
  <p>Been stuck at this for an hour. Please help!!!</p>