XAMPP mysql远程连接

①.修改%xampp%\phpMyAdmin\config.inc.php文件

 

[php] view plaincopy
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

 

改为

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

 

②.重新登录

http://localhost:88/phpmyadmin/index.php?server=1&target=main.php&token=b9d67a234c38d63cb3702f3addc16f96#PMAURL:server=1&target=main.php&token=b9d67a234c38d63cb3702f3addc16f96

启动mysql、apache,登录phpMyAdmin。在“权限”部分添加一个root@%用户,内容参照 root@localhost 的设置;两者的区别就是主机字段,一个写%,一个写localhost;

 

参考网址:http://blog.csdn.net/wb96a1007/article/details/40800899

posted @ 2015-04-17 10:48  JC_C'  阅读(1962)  评论(0编辑  收藏  举报