phpMyAdmin 尝试连接到 MySQL 服务器服务器拒绝连接问题解决方法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/baidu_36681154/article/details/83616048

问题如下:

我是warmserver中在用phpadmin遇到如图所示问题:

解决方法

1 在wamp/apps/phpMyadmin搜索到 文件config.inc.php 如图所示

2用记事本打开

 代码如下:

<?php

/* Servers configuration */
$i = 0;

/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

/* End of servers configuration */

$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>

3.修改

$cfg['Servers'][$i]['extension'] = 'mysql';

$cfg['Servers'][$i]['password'] = 'root';

4.重启warmserver

猜你喜欢

转载自blog.csdn.net/baidu_36681154/article/details/83616048