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

后端 未结 16 893
谎友^
谎友^ 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:33

    Might be late to the party - also, this answer is for LAMP users who got to this thread from google, like me.

    Basically, the problem is PMA is trying to connect to SQL with a user that doesn't exist.

    At /etc/phpmyadmin/config-db.php, you will find 2 variables: $dbuser, and $dbpass. Those specify the MySQL user and Password that PMA is trying to connect with.

    Now, connect with some username/password that work (or just "root" if you are connecting from localhost), create a new user with global priviliges (e.g - %PMA User% with password %Some Random Password%), then in the above mentioned file set:
    $dbuser = %PMA User% ;
    $dbpass = %Some Random Password%;

    You might also change other stuff there, like the server address ($dbserver), the port ($dbport, which might not be the default one on your machine), and more.

提交回复
热议问题