0

I am trying to link a website folder through MAMP in the htdocs directory. But when I go to the localhost:888 to see my website, I'm thrown an access denied for user root. I've tried everything online. My dhb.inc.php has username root's password to an empty string yet it still is giving me this error.

Error:
Connection failed: Access denied for user 'root'@'localhost' 
(using password: NO)

dhb.inc.php file permissions:

<?php
$dBServername = "localhost";
$dBUsername = "root";
$dBPassword = "";
$dBName = "loginsystemtut";

1 Answers1

0

Try this:

  • Open the Mac OS Terminal Application located in your /Applications/Utilities directory.
  • Enter the following command line: /Applications/MAMP/Library/bin/mysqladmin -u root -p password [NewPassword]

For phpMyAdmin change the password in /Applications/MAMP/bin/phpMyAdmin/config.inc.php

Paul
  • 329
  • 1
  • 8