Wamp phpMyAdmin error #1045 - Access denied for user 'root'@'localhost'

前端 未结 7 760
日久生厌
日久生厌 2021-01-02 01:14

This is quite common problem and I found a lot of tutorials to help me solve it, although, there is one additional problem with my case...

This is my config settings

相关标签:
7条回答
  • 2021-01-02 01:54

    Change the line:

    $cfg['Servers'][$i]['auth_type'] = 'config';
    

    to

    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    

    Restart and you will be asked for the password the next access to the phpmyadmin page

    0 讨论(0)
  • 2021-01-02 01:56

    Try username = root and password is blank.

    0 讨论(0)
  • 2021-01-02 01:59

    Step 1: Open your MySQL console.

    Step 2: Enter the Provided Command Lines

    $use mysql;
    $UPDATE mysql.user SET password="PASSWORD("YourPassword") WHERE user="root";
    $FLUSH PRIVILEGES;
    $exit;

    Step 3: Open and edit your config.inc.php file located in your local server files

    1. Go to My Computer > C Drive > ( Your Local Server Folder, WAMP/MAMP/XAMPP ) > APPS > PHPMYADMIN > config.inc.php
    2. Using a text editor, such as Notepad++, open your config.inc.php file.
    3. Find this line of code: $cfg['Servers'][$i]['password'] = ''; // MySQL password
    4. Change ['password'] = ''; --to--> ['password'] = 'YourPassword'; with the new chosen password you created from Step 2.
    5. Click Save

    Step 4: Go to phpmyadmin go to http://localhost/phpMyAdmin/.

    0 讨论(0)
  • 2021-01-02 01:59

    go to control panel > administrative tool> service >

    then you will find a list of items , navigate to MYSQL

    right click on its properties , in general tab start type make it automatic

    then apply / save

    and finally restart all services in wamp

    0 讨论(0)
  • 2021-01-02 02:00

    Did you add a password to the MySQL 'root' userid?

    If not, by default it comes without a password. So use

    $cfg['Servers'][$i]['password'] = '';
    

    and remove this its a defunct parameter since phpMyAdmon 3.2.0

    $cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
    
    0 讨论(0)
  • 2021-01-02 02:08

    On the MySQL error page, where two pink coloured error panels are appeared, you can find a small button at right side there. click on it.

    0 讨论(0)
提交回复
热议问题