利用phpmyadmin登录mysql数据库,网上有一些方法,总结一下有这么两种:
一种是通过config.inc.php来修改,但是这种方法每次我换想要登录的主机时都需要修改一遍代码,很是麻烦;
另一种就是改代码,在index里面加入一段传递服务器地址的代码,改动量很大。
其实还有一种很简单的做法
找到config.default.php文件
将里面的:
$cfg['AllowArbitraryServer'] = false;
改为:
$cfg['AllowArbitraryServer'] = true;
然后刷新phpmyadmin的登陆页面就可以了,效果如下: