每次关机后我都会启动笔记本电脑,我需要重新安装XAMPP以解决“拒绝访问”这个问题以及其他一些错误(显示在上传的照片中)。从XAMPP重新启动服务器不会改变任何东西。它背后的真正原因是什么以及如何解决它?
答案 0 :(得分:0)
转到文件夹C:\ xampp \ phpMyAdmin,int这个文件夹中有一个文件" config.inc.php"。在Notepad ++或Sublime Text或任何文本编辑器中打开此文件。
在此代码下方添加以下2个代码:
$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 */
?>