123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <?php
- return [
- 'db' => [
- 'class' => 'yii\db\Connection',
- // 'dsn' => 'mysql:host=192.168.1.214;dbname=valuesys',
- // 'dsn' => 'pgsql:host=127.0.0.1;port=5432;dbname=financialdb',
- 'dsn' => 'pgsql:host=172.16.107.5;port=5432;dbname=financialdb',
- 'username' => 'finance',
- 'password' => 'Finance@unicom23',
- 'charset' => 'utf8',
- 'tablePrefix' => 'car_theme"."wz_',
- /* 'schemaMap' => [
- 'pgsql'=> [
- 'class'=>'yii\db\pgsql\Schema',
- 'defaultSchema' => 'public' //specify your schema here
- ]
- ]*/
- // Schema cache options (for production environment)
- //'enableSchemaCache' => true,
- //'schemaCacheDuration' => 60,
- //'schemaCache' => 'cache',
- /*
- // 配置从服务器账户密码
- 'slaveConfig' => [
- 'username' => 'root',
- 'password' => 'root',
- 'attributes' => [
- // use a smaller connection timeout
- PDO::ATTR_TIMEOUT => 10,
- ],
- 'charset' => 'utf8',
- ],
- //配置从服务器组
- 'slaves' => [
- ['dsn' => 'mysql:host=192.168.0.2;dbname=hyii2'],
- ],
- */
- ],
- 'db2' => [
- 'class' => 'yii\db\Connection',
- # 'dsn' => 'mysql:host=192.168.1.214;dbname=valuesys',
- 'dsn' => 'pgsql:host=172.16.107.5;port=5432;dbname=valuesys1',
- 'username' => 'valuesys',
- 'password' => 'Hebei12#$',
- 'charset' => 'utf8mb4',
- 'tablePrefix' => 'wz_',
- // Schema cache options (for production environment)
- //'enableSchemaCache' => true,
- //'schemaCacheDuration' => 60,
- //'schemaCache' => 'cache',
- /*
- // 配置从服务器账户密码
- 'slaveConfig' => [
- 'username' => 'root',
- 'password' => 'root',
- 'attributes' => [
- // use a smaller connection timeout
- PDO::ATTR_TIMEOUT => 10,
- ],
- 'charset' => 'utf8',
- ],
- //配置从服务器组
- 'slaves' => [
- ['dsn' => 'mysql:host=192.168.0.2;dbname=hyii2'],
- ],
- */
- ],
- ];
|