phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

后端 未结 16 831
谎友^
谎友^ 2020-12-05 00:17

I keep getting the following errors with mysql connection through XAMPP and I don\'t know what to do:

That\'s the code in the config.inc.php



        
相关标签:
16条回答
  • 2020-12-05 00:39

    I experienced the same errors on a fresh install of VestaCP. I solved the issues by following the instructions on this video.

    1. Go to phpmyadmin-fixer and run the appropriate command.
    2. Restart Apache, NGINX and MySQL servers.
    3. That's it!
    0 讨论(0)
  • 2020-12-05 00:40

    I solved the problem by adding the line skip-grant-tables to the my.ini:

    # The MySQL server
    [mysqld]
    skip-grant-tables
    port= 3306
    ...
    

    Under XAMPP Control Panel > Section "MySQL" > Config > my.ini

    0 讨论(0)
  • 2020-12-05 00:44

    Add these lines to the file xampp\phpMyAdmin\config.inc:

    $cfg['Servers'][$i]['controluser'] = 'root'; 
    $cfg['Servers'][$i]['controlpass'] = '';
    
    0 讨论(0)
  • 2020-12-05 00:46

    I am using UniServer Zero XIV 13.x.x UniController XIV V2.3.1:

    From the command line I did this:

    mysql> CREATE USER 'pmauser'@'%' IDENTIFIED BY 'MyPasswordHere!';
    Query OK, 0 rows affected (0.07 sec)
    
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'pmauser'@'%' WITH GRANT OPTION;
    Query OK, 0 rows affected (0.02 sec)
    

    Then I went to C:\...\wamp\ZeroXIV_unicontroller_2_3_1\UniServerZ\home\us_opt1\config.inc.php and modified the file to have this:

    /* PMA User advanced features */
    //////////$cfg['Servers'][$i]['controluser']    = 'pma';
    //////////$cfg['Servers'][$i]['controlpass']    = $password;
    $cfg['Servers'][$i]['controluser']    = 'pmauser';
    $cfg['Servers'][$i]['controlpass']    = 'MyPasswordHere!';
    

    I restarted Apache and MySQL. The error is gone!

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