Browse Source

使用财务报表功能,mysql 连接配置默认需要传递 port 参数

zesai 2 years ago
parent
commit
c1095c4be5
2 changed files with 2 additions and 0 deletions
  1. 1 0
      config/.config.example.php
  2. 1 0
      src/Services/Config.php

+ 1 - 0
config/.config.example.php

@@ -20,6 +20,7 @@ $_ENV['db_socket']    = '';
 $_ENV['db_database']  = 'sspanel';           //数据库名
 $_ENV['db_username']  = 'root';              //数据库用户名
 $_ENV['db_password']  = 'sspanel';           //用户名对应的密码
+$_ENV['db_port']      = '3306';              //端口
 #高级
 $_ENV['db_charset']   = 'utf8mb4';
 $_ENV['db_collation'] = 'utf8mb4_unicode_ci';

+ 1 - 0
src/Services/Config.php

@@ -56,6 +56,7 @@ final class Config
             'charset' => $_ENV['db_charset'],
             'collation' => $_ENV['db_collation'],
             'prefix' => $_ENV['db_prefix'],
+            'port' => $_ENV['db_port'],
         ];
     }