From 35ec1b94d223afdc2eb36707d081b9bba48969de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Sun, 1 Sep 2024 22:23:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=90=8C=E6=AD=A5=E5=88=B0=20Static=20=E6=8F=92?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/database.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/database.php b/config/database.php index b0881a00f..4ee1437cf 100644 --- a/config/database.php +++ b/config/database.php @@ -16,7 +16,7 @@ return [ // 默认使用的数据库连接配置 - 'default' => 'mysql', + 'default' => env('type.db_type', 'sqlite'), // 自定义时间查询规则 'time_query_rule' => [], // 自动写入时间戳字段 @@ -29,19 +29,19 @@ return [ // 数据库类型 'type' => 'mysql', // 服务器地址 - 'hostname' => env('mysql.hostname', '106.55.25.32'), + 'hostname' => env('db.mysql_hostname', '127.0.0.1'), // 数据库名 - 'database' => env('mysql.database', 'admin_dv'), + 'database' => env('db.mysql_database', 'thinkadmin'), // 用户名 - 'username' => env('mysql.username', 'admin_dv'), + 'username' => env('db.mysql_username', 'root'), // 密码 - 'password' => env('mysql.password', '3twr7kNZLXeSGtc7'), + 'password' => env('db.mysql_password', ''), // 端口 - 'hostport' => env('mysql.hostport', '3306'), + 'hostport' => env('db.mysql_hostport', '3306'), // 数据库连接参数 'params' => [], // 数据库编码默认采用 utf8 - 'charset' => 'utf8mb4', + 'charset' => env('mysql.charset', 'utf8mb4'), // 数据库表前缀 'prefix' => env('mysql.prefix', ''), // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)