Author Topic: MySQL Access Denied #1045 [duplicate]  (Read 373 times)

carine

  • Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
  • Welcome to solution.mypressonline
MySQL Access Denied #1045 [duplicate]
« on: March 23, 2014, 09:26:54 AM »
Can anyone please help me with this. I cannot access phpMyAdmin. I am using WAMPSERVER 2.4 and running
Windows 7 32-bit OS.

Everytime I try to access phpMyAdmin it gives an error like this:


Error
MySQL said: Documentation
#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.

victor@007

  • Administrator
  • Newbie
  • *****
  • Posts: 8
  • Karma: +0/-0
Re: MySQL Access Denied #1045 [duplicate]
« Reply #1 on: March 23, 2014, 09:36:44 AM »
Like all versions of MySQL after initially installing it there is only one User account available.

The username is root and there is no password on this account.

c:\wamp\www\apps\phpmyadminx.y.z\config.inc.php  // For wamp users,

c:\Xampp\phpmyadmin\config.inc.php // For Xampp users

Edit your phpmyadmin config.inc.php file :

    $cfg['Servers'][$i]['verbose'] = 'localhost';
    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['port'] = '3306';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = '**put your-root-username**'; // here, make sure you put your username, by default is " root".
    $cfg['Servers'][$i]['password'] = '**put your root-password**';  // here, make sure you put your password.
    $cfg['Servers'][$i]['AllowNoPassword'] = true;