phpadmin连接远程数据库

1、打开wampserver下phpmyadmin的目录在D:wampapps下      D:wampappsphpmyadmin4.1.14 

2、找到config.inc.php文件,打开修改要连接的远程MySQL的host,user和password,更改这3个信息即可

其中必须保证数据库有被远程连接的权限

/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'admin';
$cfg['Servers'][$i]['password'] = 'root';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '192.168.1.154';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

 3.如果要用root登录此时也应该把host修改为localhost;

摘自http://blog.csdn.net/u010603691/article/details/50385409;

原文地址:https://www.cnblogs.com/feixiangsnail15-12-28/p/8445130.html