vim libraries/config.default.php
查找到localhost/127.0.0.1字符【一般来说默认都是localhost】
:/localhost
替换成容器名,例如我定义的名称是mysql
原始:$cfg['Servers'][$i]['host'] = 'localhost';
修改:$cfg['Servers'][$i]['host'] = 'mysql';
vim libraries/config.default.php
查找到localhost/127.0.0.1字符【一般来说默认都是localhost】
:/localhost
替换成容器名,例如我定义的名称是mysql
原始:$cfg['Servers'][$i]['host'] = 'localhost';
修改:$cfg['Servers'][$i]['host'] = 'mysql';
转载于:https://www.cnblogs.com/todarcy/p/11075724.html