123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- return array
- (
- # default database config
- 'default' => array
- (
- 'type' => 'pdo',
- 'host' => array
- (
- 'read' => 'localhost:3306',
- 'update' => 'localhost:3306',
- ),
- 'database' => 'dever',
- 'username' => 'root',
- 'password' => '123456',
- 'charset' => 'utf8',
- # 持久化服务器,只负责保存数据,跟读写分离差不多,但可以更换不同的数据库类型
- /*
- 'save' => array
- (
- 'type' => 'pdo',
- 'host' => 'localhost:3306',
- 'database' => 'dever_test',
- 'username' => 'root',
- 'password' => '123456',
- 'charset' => 'utf8',
- ),
- # 迁移旧的数据库服务器,具体迁移规则请到old目录中定义
- 'old' => array
- (
- 'type' => 'pdo',
- 'host' => 'localhost:3306',
- 'database' => 'mazephp',
- 'username' => 'root',
- 'password' => '123456',
- 'charset' => 'utf8',
- )
- */
- ),
- /*
- 'manage' => array
- (
- 'type' => 'mysql',
- 'host' => 'localhost:3306,localhost:3306',//read,update
- 'database' => 'dever',
- 'username' => 'root',
- 'password' => '123456',
- 'charset' => 'utf8'
- )
- array
- (
- 'type' => 'mongo',
- 'host' => '127.0.0.1:27017',
- 'database' => 'farm',
- ),
- */
-
- );
|