Cek user, password, dan nama database di baris atas file index.php.
index.php
Access denied for user 'root'@'localhost' (using password: NO)