框架tp5实现项目中的读写分离.
// 数据库类型
'type' => 'mysql',
// 服务器地址
'hostname' => '192.168.36.22,192.168.36.23',
// 数据库名
'database' => 'linux',
// 用户名
'username' => 'root,root',
// 密码
'password' => 'junwang@2014,junwang@2014',
// 端口
'hostport' => '3306,3306',
// 连接dsn
'dsn' => '',
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8,utf8',
// 数据库表前缀
'prefix' => 'tp_',
// 数据库调试模式
'debug' => true,
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 1,
// 数据库读写是否分离 主从式有效
'