为MySQL数据库创建新的PhpMyAdmin USER.错误


Creating new PhpMyAdmin USER for MySQL Database. ERROR

我使用的是XAMPP v3.2.1,我正在使用在线系统进行一个学校项目。由于我是web开发的新手,我对如何做事情没有任何提示。所以我在PhpMyAdmin中创建了一个新用户,我将其命名为"administrator",并为其输入了密码。然后我创建了一个新的MySQL数据库,并尝试将其连接到一个简单的php文件。我用这条线连接。

    $con=mysqli_connect("localhost","administrator","r00tadmin###","mjca_db");

我得到了这个错误。

    Warning: mysqli_connect(): (HY000/1045): Access denied for user 'administrator'@'localhost' (using password: YES) in C:'xampp'htdocs'SkyEngine'System'index.php on line 3

无法连接到MySQL:用户"administrator"@"localhost"的访问被拒绝(使用密码:YES)

我不知道该怎么办,我试着在谷歌上搜索,但我不知道正确的语法。我希望任何人都能帮我。感谢

我认为用户名"administrator"已经是预先准备好的词,请尝试使用另一个用户名。无论如何,如果这对你有帮助,请查看本教程http://www.yourwebskills.com/dbphpmyadminusers.php

别介意,我找到了答案。我找到了这个文件

    "C:'xampp'phpMyAdmin'config.inc.php"

并打开它。跳到第19行并将其从更改

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

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

我为早些时候的懒惰道歉。我自己找到了解决办法。我希望这能帮助到其他人。

    NOTE: this also enables the login feature of PhpMyAdmin on XAMPP