【问题标题】:How to fix 'Access Denied' message of phpmyadmin?如何修复 phpmyadmin 的“拒绝访问”消息?
【发布时间】:2016-11-08 19:13:20
【问题描述】:

每次我在关机后启动笔记本电脑时,我都需要重新安装 XAMPP 来解决“拒绝访问”的问题以及其他几个错误(如上传的照片所示)。从 XAMPP 重新启动服务器不会改变任何东西。其背后的真正原因是什么以及如何解决?

【问题讨论】:

标签: php mysql phpmyadmin xampp


【解决方案1】:

转到文件夹 C:\xampp\phpMyAdmin,在这个文件夹中有一个文件“config.inc.php”。在 Notepad++ 或 Sublime Text 或任何文本编辑器中打开此文件。

在此代码下方添加这两个代码:

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

添加以下代码:

$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;

重启你的xampp,它会工作

我的 xampp 配置代码如下:

<?php

/* Servers configuration */
$i = 0;

$cfg['blowfish_secret'] = 'a8b7c6d'; //What you want

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'Local Databases';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

// Hidden databases in PhpMyAdmin left panel
//$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';

// Allow connection without password
$cfg['Servers'][$i]['AllowNoPassword'] = true;

// Suppress Warning about pmadb tables
$cfg['PmaNoRelation_DisableWarning'] = true;

// To have PRIMARY & INDEX in table structure export
//$cfg['Export']['sql_drop_table'] = true;
//$cfg['Export']['sql_if_not_exists'] = true;

$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.7/en/';
/* End of servers configuration */

?>

【讨论】:

    猜你喜欢
    • 2013-10-29
    • 2012-11-02
    • 2016-09-24
    • 2014-05-25
    • 2018-06-03
    • 2016-04-02
    • 2014-06-05
    • 2019-02-07
    相关资源
    最近更新 更多