From 41f6333c3fe994525711c69381d449aee2e5c3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 7 Aug 2024 23:29:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=AF=86=E7=A0=81=EF=BC=8C=E6=96=B9=E4=BE=BF=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/database.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/database.php b/config/database.php index ab5889c11..b0881a00f 100644 --- a/config/database.php +++ b/config/database.php @@ -29,21 +29,21 @@ return [ // 数据库类型 'type' => 'mysql', // 服务器地址 - 'hostname' => '106.55.25.32', + 'hostname' => env('mysql.hostname', '106.55.25.32'), // 数据库名 - 'database' => 'admin_dv', + 'database' => env('mysql.database', 'admin_dv'), // 用户名 - 'username' => 'admin_dv', + 'username' => env('mysql.username', 'admin_dv'), // 密码 - 'password' => '3twr7kNZLXeSGtc7', + 'password' => env('mysql.password', '3twr7kNZLXeSGtc7'), // 端口 - 'hostport' => '3306', + 'hostport' => env('mysql.hostport', '3306'), // 数据库连接参数 'params' => [], // 数据库编码默认采用 utf8 'charset' => 'utf8mb4', // 数据库表前缀 - 'prefix' => '', + 'prefix' => env('mysql.prefix', ''), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 'deploy' => 0, // 数据库读写是否分离 主从式有效