Debug School

rakesh kumar
rakesh kumar

Posted on

1045 - Access denied for user 'root'@'localhost' (using password: No)

Error – 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.

Image description

SOLUTION

/opt/lampp/phpmyadmin
Enter fullscreen mode Exit fullscreen mode
vi config.inc.php
Enter fullscreen mode Exit fullscreen mode
head -n 40 config.inc.php | tail -n 15 
Enter fullscreen mode Exit fullscreen mode
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'Hsgjdk3768yuik';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)