连接到远程服务器时,无法使phpmyadmin使用登录表单
我在Debian上用Python和Mariadb设置了一个Django服务器(称为D-server)。都在工作。我想使用另一个具有PHPMyAdmin的服务器(称为P-server)来管理D-server。我能够配置远程访问,打开防火墙,从P-server日志进入D-server,并通过终端(MariaDB中的SSH putty)将数据插入D-server上的表中。然后,我将下面的代码添加到PHPMyAdmin config.inc.php文件中,以使用PHPMyAdmin连接到远程服务器时,无法使phpmyadmin使用登录表单,phpmyadmin,mariadb,Phpmyadmin,Mariadb,我在Debian上用Python和Mariadb设置了一个Django服务器(称为D-server)。都在工作。我想使用另一个具有PHPMyAdmin的服务器(称为P-server)来管理D-server。我能够配置远程访问,打开防火墙,从P-server日志进入D-server,并通过终端(MariaDB中的SSH putty)将数据插入D-server上的表中。然后,我将下面的代码添加到PHPMyAdmin config.inc.php文件中,以使用PHPMyAdmin $i++; $cfg
$i++;
$cfg['Servers'][$i]['host'] = '192.168.100.11';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = ‘myusername’;
$cfg['Servers'][$i]['password'] = 'mypassword';
宾果一切正常,我得到下拉选择,并使用Server-p上的phpMyAdmin连接到我的Server-D
但是(问题是),它会自动连接,而不会让我使用PHPMyAdmin表单登录表单。所以我用两个单引号取出了我的用户名和密码:
$cfg['Servers'][$i]['user'] = ‘’;( that is two Single ‘’)
$cfg['Servers'][$i]['password'] = ''; ( that is two Single ‘=)
MySQL说:文档
我无法连接无效的设置:
phpMyAdmin试图连接到MySQL服务器,但服务器拒绝了连接。您应该检查配置中的主机、用户名和密码,并确保它们与MySQL服务器管理员提供的信息相对应
那么如果我使用两个double,我得到:
“mysqli_real_connect():(HY000/1045):拒绝用户的访问”dbadmin@192.168.100.3“@”localhost(使用密码:YES)
问题是如何使用phpMyAdmin用户名和密码登录表单。查看
更改:
$cfg['Servers'][$i]['auth_type'] = 'config';
to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
这将允许用户使用web表单登录。$cfg['Servers'][$i]['auth_type']='cookie';解决了我的问题谢谢。