0

I don't know what happen. I just set a password in one of accounts registered and that appears. What to do?

Error MySQL said: Documentation

1045 - Access denied for user 'root'@'localhost' (using password: NO) mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

  • 4
    Possible duplicate of [Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?](https://stackoverflow.com/questions/17975120/access-denied-for-user-rootlocalhost-using-password-yes-no-privileges) – Ravi Oct 04 '17 at 15:30
  • You have to update your new password in `config.inc.php` in the line `$cfg['Servers'][$i]['password'] = 'yourpassword';` – Panther Oct 04 '17 at 15:30

1 Answers1

0
$serverName = "localhost";
$myDb = "prodectDb";
$user = "root";
$password = "root";
// use your database password or default password root or check 
//password using empty


$con = mysqli_connect($serverName,$user,$password,$myDb);