PHP code example of iamdevice / codeception-multidb
1. Go to this page and download the library: Download iamdevice/codeception-multidb library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
iamdevice / codeception-multidb example snippets
modules:
enabled:
- MultiDb
config:
MultiDb:
connections:
masterDb:
dsn: 'mysql:host=localhost;port=3306;dbname=database'
user: 'username'
password: 'password'
primary: true
dump: ''
populate: true
cleanup: false
reconnect: true
slaveDb:
dsn: 'mysql:host=localhost;port=3307;dbname=database'
user: 'username'
password: 'password'
dump: ''
populate: true
cleanup: false
reconnect: true