php - #1045 无法在 wamp 中登录 MySQL 服务器

标签 php mysql phpmyadmin wamp

我在服务器和本地机器上都安装了 wamp。在本地机器上,这工作正常。但是服务器中发生了一些问题。当我登录到 phpmyadmin #1045 Cannot log in to the MySQL server 错误显示。我该如何解决这个问题?

我的config.inc.php 文件包含以下代码

/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'admin';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

请帮助我..谢谢..

最佳答案

使用默认密码登录:

Username: root

Password: [null]

[null] 我的意思是根本没有密码。

关于php - #1045 无法在 wamp 中登录 MySQL 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28541325/

相关文章:

php - 你能为一个类创建一个外部 PHPdoc 吗?

php - 防止从详细信息页面进行sql注入(inject)

php - 使用php的网页带宽控制

Ubuntu上的PHP扩展目录

php - Cakephp 数据库迁移有问题

mysql - 如何通过网络在xampp phpmyadmin上导入sql

mysql:如何从两个表中选择

mysql - 更改sql的目录文件名

mysql - 如何在 AWS 上使用我的数据库

php - Mysql int字段默认为null设置为0