作者 kira

修复执行install命令主机不是127.0.0.1的时候安装失败问题

执行php think install --hostname 172.17.0.1 --password 1234 --force true的时候,假如用的主机名不是127.0.0.1的话,会安装失败,因为DB实例连接到本地了
... ... @@ -59,7 +59,7 @@ class Install extends Command
// 连接install命令中指定的数据库
$instance = Db::connect([
'type' => 'mysql',
'type' => "{$config['type']}",
'hostname' => "{$hostname}",
'hostport' => "{$hostport}",
'database' => "{$database}",
... ...